mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-04 05:12:38 +02:00
chore(usage): stop polling /users/me and token-status for live fields
This commit is contained in:
parent
38a4742ec6
commit
b9b4d0b377
2 changed files with 4 additions and 10 deletions
|
|
@ -8,7 +8,10 @@ const userQueryFn = () => userApiService.getMe();
|
|||
export const currentUserAtom = atomWithQuery(() => {
|
||||
return {
|
||||
queryKey: USER_QUERY_KEY,
|
||||
staleTime: 5 * 60 * 1000,
|
||||
// Live-changing numeric fields (pages_*, premium_tokens_*) are now
|
||||
// pushed via Zero (queries.user.me()), so /users/me only needs to
|
||||
// fire once per session for the static profile fields.
|
||||
staleTime: Infinity,
|
||||
enabled: !!getBearerToken(),
|
||||
queryFn: userQueryFn,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue