Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MrFlashAccount committed Dec 18, 2024
1 parent 40d7dc2 commit 077c1ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/gui/src/dashboard/hooks/offlineHooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
8 changes: 1 addition & 7 deletions app/gui/src/dashboard/providers/SessionProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,7 @@ export interface SessionProviderProps {
function createSessionQuery(userSession: (() => Promise<cognito.UserSession | null>) | 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,
})
}

Expand Down

0 comments on commit 077c1ff

Please sign in to comment.