Skip to content

Commit 79c122b

Browse files
It's always prettier
1 parent 0963bae commit 79c122b

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

examples/svelte/auto-refetching/src/routes/+page.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@
2222
const addMutation = createMutation({
2323
mutationFn: (value: string) =>
2424
fetch(`${endpoint}?add=${value}`).then((r) => r.json()),
25-
onSuccess: () => client.invalidateQueries({ queryKey: ['refetch']}),
25+
onSuccess: () => client.invalidateQueries({ queryKey: ['refetch'] }),
2626
})
2727
2828
const clearMutation = createMutation({
2929
mutationFn: () => fetch(`${endpoint}?clear=1`).then((r) => r.json()),
30-
onSuccess: () => client.invalidateQueries({ queryKey: ['refetch']}),
30+
onSuccess: () => client.invalidateQueries({ queryKey: ['refetch'] }),
3131
})
3232
</script>
3333

examples/svelte/optimistic-updates-typescript/src/routes/+page.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
onMutate: async (newTodo: string) => {
4747
text = ''
4848
// Cancel any outgoing refetches (so they don't overwrite our optimistic update)
49-
await client.cancelQueries({queryKey: ['optimistic']})
49+
await client.cancelQueries({ queryKey: ['optimistic'] })
5050
5151
// Snapshot the previous value
5252
const previousTodos = client.getQueryData<Todos>(['optimistic'])
@@ -72,7 +72,7 @@
7272
},
7373
// Always refetch after error or success:
7474
onSettled: () => {
75-
client.invalidateQueries({queryKey: ['optimistic']})
75+
client.invalidateQueries({ queryKey: ['optimistic'] })
7676
},
7777
})
7878
</script>

examples/svelte/playground/src/routes/AddTodo.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
1313
let name = ''
1414
15-
const postTodo = async ({ name, notes }: { name: string, notes: string }) => {
15+
const postTodo = async ({ name, notes }: { name: string; notes: string }) => {
1616
console.info('postTodo', { name, notes })
1717
return new Promise((resolve, reject) => {
1818
setTimeout(() => {

examples/svelte/playground/src/routes/EditTodo.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
editingIndex,
1313
} from '../lib/stores'
1414
15-
type Todo = { id: number, name: string, notes: string }
15+
type Todo = { id: number; name: string; notes: string }
1616
1717
const queryClient = useQueryClient()
1818

0 commit comments

Comments
 (0)