mirror of
https://github.com/coder/coder.git
synced 2026-09-22 13:10:21 +08:00
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.
This commit is contained in:
@@ -131,7 +131,6 @@ export const me = (): UseQueryOptions<User> & {
|
||||
queryKey: meKey,
|
||||
initialData: initialUserData,
|
||||
queryFn: API.getAuthenticatedUser,
|
||||
refetchOnWindowFocus: true,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user