mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-22 10:51:12 -05:00
Fix: Configure QueryClient to disable refetchOnWindowFocus
This commit is contained in:
12
src/App.tsx
12
src/App.tsx
@@ -46,7 +46,17 @@ import AdminBlog from "./pages/AdminBlog";
|
||||
import ForceLogout from "./pages/ForceLogout";
|
||||
import AuthCallback from "./pages/AuthCallback";
|
||||
|
||||
const queryClient = new QueryClient();
|
||||
const queryClient = new QueryClient({
|
||||
defaultOptions: {
|
||||
queries: {
|
||||
refetchOnWindowFocus: false, // Disable automatic refetch on tab focus
|
||||
refetchOnMount: true, // Keep refetch on component mount
|
||||
refetchOnReconnect: true, // Keep refetch on network reconnect
|
||||
retry: 1, // Keep retry attempts
|
||||
staleTime: 0, // Keep data fresh
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
function AppContent() {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user