Skip to content

Commit d708ac7

Browse files
fix(site): remove refetch on windows focus (#11574)
It causes the sign-in page to reload whenever a user enters a page or changes the window's focus. This is happening because when the "user" fetch is made, the server returns an error, making the react-query mark the data as stale and try to load it whenever possible.
1 parent 3695b74 commit d708ac7

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

site/src/api/queries/users.ts

-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ export const me = (): UseQueryOptions<User> & {
131131
queryKey: meKey,
132132
initialData: initialUserData,
133133
queryFn: API.getAuthenticatedUser,
134-
refetchOnWindowFocus: true,
135134
};
136135
};
137136

0 commit comments

Comments
 (0)