mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
update orpc tanstack query integration (#299)
This commit is contained in:
@@ -70,12 +70,12 @@ export default function TodosScreen() {
|
||||
);
|
||||
const toggleMutation = useMutation(
|
||||
orpc.todo.toggle.mutationOptions({
|
||||
onSuccess: () => todos.refetch(),
|
||||
onSuccess: () => { todos.refetch() },
|
||||
}),
|
||||
);
|
||||
const deleteMutation = useMutation(
|
||||
orpc.todo.delete.mutationOptions({
|
||||
onSuccess: () => todos.refetch(),
|
||||
onSuccess: () => { todos.refetch() },
|
||||
}),
|
||||
);
|
||||
{{/if}}
|
||||
@@ -91,12 +91,12 @@ export default function TodosScreen() {
|
||||
);
|
||||
const toggleMutation = useMutation(
|
||||
trpc.todo.toggle.mutationOptions({
|
||||
onSuccess: () => todos.refetch(),
|
||||
onSuccess: () => { todos.refetch() },
|
||||
}),
|
||||
);
|
||||
const deleteMutation = useMutation(
|
||||
trpc.todo.delete.mutationOptions({
|
||||
onSuccess: () => todos.refetch(),
|
||||
onSuccess: () => { todos.refetch() },
|
||||
}),
|
||||
);
|
||||
{{/if}}
|
||||
|
||||
@@ -73,12 +73,12 @@ export default function TodosScreen() {
|
||||
);
|
||||
const toggleMutation = useMutation(
|
||||
orpc.todo.toggle.mutationOptions({
|
||||
onSuccess: () => todos.refetch(),
|
||||
onSuccess: () => { todos.refetch() },
|
||||
})
|
||||
);
|
||||
const deleteMutation = useMutation(
|
||||
orpc.todo.delete.mutationOptions({
|
||||
onSuccess: () => todos.refetch(),
|
||||
onSuccess: () => { todos.refetch() },
|
||||
})
|
||||
);
|
||||
{{/if}}
|
||||
@@ -94,12 +94,12 @@ export default function TodosScreen() {
|
||||
);
|
||||
const toggleMutation = useMutation(
|
||||
trpc.todo.toggle.mutationOptions({
|
||||
onSuccess: () => todos.refetch(),
|
||||
onSuccess: () => { todos.refetch() },
|
||||
})
|
||||
);
|
||||
const deleteMutation = useMutation(
|
||||
trpc.todo.delete.mutationOptions({
|
||||
onSuccess: () => todos.refetch(),
|
||||
onSuccess: () => { todos.refetch() },
|
||||
})
|
||||
);
|
||||
{{/if}}
|
||||
@@ -337,4 +337,4 @@ const styles = StyleSheet.create((theme) => ({
|
||||
textDecorationLine: "line-through",
|
||||
color: theme.colors.border,
|
||||
},
|
||||
}));
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user