diff --git a/projects/website/src/components/providers/query-provider.tsx b/projects/website/src/components/providers/query-provider.tsx index c19f40e..5939a64 100644 --- a/projects/website/src/components/providers/query-provider.tsx +++ b/projects/website/src/components/providers/query-provider.tsx @@ -1,12 +1,19 @@ "use client"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; +import { ReactNode } from "react"; type Props = { - children: React.ReactNode; + children: ReactNode; }; -const queryClient = new QueryClient(); +const queryClient = new QueryClient({ + defaultOptions: { + queries: { + staleTime: 1000 * 30, // 30 seconds + }, + }, +}); export function QueryProvider({ children }: Props) { return {children};