Open History to see the last commit
1import { QueryClient } from '@tanstack/svelte-query'
2import type { LayoutLoad } from './$types'
3import { browser } from '$app/environment'
4β
5export const load: LayoutLoad = () => {
6 const queryClient = new QueryClient({
7 defaultOptions: {
8 queries: {
9 enabled: browser,
10 staleTime: 10 * 1000,
11 },
12 },
13 })
14β
15 return { queryClient }
16}