️(frontend) dont endlessly query user info

we query user at load and keep info for a while, way less than user
session anyway. will need to check if we could get de-sync (like loading
the frontend with backend user session ending in 30 minutes while we
don't check user state until an hour)
This commit is contained in:
Emmanuel Pelletier
2024-07-30 01:37:20 +02:00
parent 62492d1411
commit af0746eac1

View File

@@ -12,6 +12,7 @@ export const useUser = () => {
const query = useQuery({
queryKey: [keys.user],
queryFn: fetchUser,
staleTime: 1000 * 60 * 60, // 1 hour
})
const isLoggedIn =