eexiv/src/app/providers.tsx
q9i 8b6a8f8abf chore: enforce authoritarian import ordering
Some random VSC prompt allows me to do this, still have no idea how to automate or reproduce this behavior
2024-02-19 11:07:48 -08:00

25 lines
538 B
TypeScript

'use client'
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { useMemo } from 'react'
type ProvidersProps = {
children: React.ReactNode
}
export default function Providers({ children }: Readonly<ProvidersProps>) {
const queryClient = useMemo(
() =>
new QueryClient({
defaultOptions: {
queries: {
staleTime: 60 * 1000,
},
},
}),
[]
)
return (
<QueryClientProvider client={queryClient}>{children}</QueryClientProvider>
)
}