diff --git a/app/gui/src/dashboard/hooks/offlineHooks.ts b/app/gui/src/dashboard/hooks/offlineHooks.ts index 0c2d509f57cd..c20f0c075891 100644 --- a/app/gui/src/dashboard/hooks/offlineHooks.ts +++ b/app/gui/src/dashboard/hooks/offlineHooks.ts @@ -10,7 +10,7 @@ export function useOffline() { const isOnline = React.useSyncExternalStore( reactQuery.onlineManager.subscribe.bind(reactQuery.onlineManager), () => reactQuery.onlineManager.isOnline(), - () => navigator.onLine, + () => false, ) return { isOffline: !isOnline } diff --git a/app/gui/src/dashboard/providers/SessionProvider.tsx b/app/gui/src/dashboard/providers/SessionProvider.tsx index a33c85b975fc..a3931a1c33e7 100644 --- a/app/gui/src/dashboard/providers/SessionProvider.tsx +++ b/app/gui/src/dashboard/providers/SessionProvider.tsx @@ -61,13 +61,7 @@ export interface SessionProviderProps { function createSessionQuery(userSession: (() => Promise) | null) { return reactQuery.queryOptions({ queryKey: ['userSession'], - queryFn: async () => { - const session = (await userSession?.().catch(() => null)) ?? null - return session - }, - refetchOnWindowFocus: 'always', - refetchOnMount: 'always', - refetchOnReconnect: 'always', + queryFn: () => userSession?.().catch(() => null) ?? null, }) }