components/global-navbar.tsx:143-144 and components/ui/global-resizable-navbar.tsx:40 both pass userId="user-1" to <NavRankBadge> and <CreditBalance>. Every authenticated user sees user-1's rank and credit balance in the navbar regardless of who they're signed in as.
A {/* TODO: Replace with actual auth user ID */} comment is already there acknowledging the placeholder.
What to do
In both files:
- Read the session via
authClient.useSession() (already imported in global-navbar.tsx, needs adding in global-resizable-navbar.tsx)
- Pull
userId = session?.user?.id
- Pass that to both
NavRankBadge and CreditBalance. When undefined, the components already render their own empty state.
Remove the TODO comment once wired.
Acceptance criteria
- Signed-in users see their own rank badge and credit balance in the navbar
- Signed-out users see whatever empty state
NavRankBadge and CreditBalance already render for undefined userId
- No grep hit for
"user-1" in either navbar file
- TODO comment removed
Files
components/global-navbar.tsx
components/ui/global-resizable-navbar.tsx
components/global-navbar.tsx:143-144andcomponents/ui/global-resizable-navbar.tsx:40both passuserId="user-1"to<NavRankBadge>and<CreditBalance>. Every authenticated user sees user-1's rank and credit balance in the navbar regardless of who they're signed in as.A
{/* TODO: Replace with actual auth user ID */}comment is already there acknowledging the placeholder.What to do
In both files:
authClient.useSession()(already imported inglobal-navbar.tsx, needs adding inglobal-resizable-navbar.tsx)userId = session?.user?.idNavRankBadgeandCreditBalance. When undefined, the components already render their own empty state.Remove the TODO comment once wired.
Acceptance criteria
NavRankBadgeandCreditBalancealready render for undefineduserId"user-1"in either navbar fileFiles
components/global-navbar.tsxcomponents/ui/global-resizable-navbar.tsx