2 parents 26972e5 + 23bdbe9 commit d4b9256Copy full SHA for d4b9256
1 file changed
app/leaderboard/page.tsx
@@ -11,6 +11,7 @@ import {
11
import { LeaderboardTimeframe } from "@/lib/graphql/generated";
12
import { useState, useEffect } from "react";
13
import { useRouter, useSearchParams } from "next/navigation";
14
+import { authClient } from "@/lib/auth-client";
15
import {
16
TIMEFRAMES,
17
TIERS,
@@ -45,9 +46,8 @@ export default function LeaderboardPage() {
45
46
tags: initialTags || [],
47
});
48
- // Fake current user ID for demo purposes
49
- // In a real app this would come from auth context
50
- const currentUserId = "user-1";
+ const { data: session } = authClient.useSession();
+ const currentUserId = session?.user?.id;
51
52
// Debounce filters to prevent rapid API calls/URL updates
53
const [debouncedFilters, setDebouncedFilters] =
0 commit comments