feat: unified credits and its cost calculations

This commit is contained in:
DESKTOP-RTLN3BA\$punk 2026-05-02 14:34:23 -07:00
parent 451a98936e
commit ae9d36d77f
61 changed files with 5835 additions and 272 deletions

View file

@ -8,9 +8,9 @@ const userQueryFn = () => userApiService.getMe();
export const currentUserAtom = atomWithQuery(() => {
return {
queryKey: USER_QUERY_KEY,
// 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.
// Live-changing numeric fields (pages_*, premium_credit_micros_*)
// 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,