Files
hemhub-web/src/app/providers.tsx
2025-10-09 14:14:17 +02:00

14 lines
457 B
TypeScript

// src/app/providers.tsx
import { type PropsWithChildren, useState } from 'react'
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
export function AppProviders({ children }: PropsWithChildren) {
const [client] = useState(
() =>
new QueryClient({
defaultOptions: { queries: { refetchOnWindowFocus: false, retry: 1 } },
})
)
return <QueryClientProvider client={client}>{children}</QueryClientProvider>
}