import { QueryClientProvider, QueryClient } from '@tanstack/react-query'


function QueryClientContext({children}) {
  const queryClient = new QueryClient({
    defaultOptions: {
      queries: {
        refetchOnWindowFocus: false,
        retry: 3,
        // refetchOnMount: false,
        staleTime: 3000
      },
    },
  })
  return (
    <QueryClientProvider client={queryClient}>
      {children}
    </QueryClientProvider>
  );
}

export default QueryClientContext;
