From 13029e88e058ce5752d19203d06142cd6081beaf Mon Sep 17 00:00:00 2001 From: nanaabdul1172 Date: Sat, 27 Jun 2026 02:25:29 +0100 Subject: [PATCH 1/2] Leaderboard hardcodes currentUserId = user-1 instead of reading from session --- .vscode/settings.json | 3 ++- app/leaderboard/page.tsx | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 0967ef42..2c63c085 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1 +1,2 @@ -{} +{ +} diff --git a/app/leaderboard/page.tsx b/app/leaderboard/page.tsx index e859830a..e325b10f 100644 --- a/app/leaderboard/page.tsx +++ b/app/leaderboard/page.tsx @@ -11,6 +11,7 @@ import { import { LeaderboardTimeframe } from "@/lib/graphql/generated"; import { useState, useEffect } from "react"; import { useRouter, useSearchParams } from "next/navigation"; +import { authClient } from "@/lib/auth-client"; import { TIMEFRAMES, TIERS, @@ -45,9 +46,8 @@ export default function LeaderboardPage() { tags: initialTags || [], }); - // Fake current user ID for demo purposes - // In a real app this would come from auth context - const currentUserId = "user-1"; + const { data: session } = authClient.useSession(); + const currentUserId = session?.user?.id; // Debounce filters to prevent rapid API calls/URL updates const [debouncedFilters, setDebouncedFilters] = From 23bdbe91c0e4875302a003562272fc1bfe53298b Mon Sep 17 00:00:00 2001 From: nanaabdul1172 Date: Sat, 27 Jun 2026 14:25:22 +0100 Subject: [PATCH 2/2] revert unintended .vscode/settings.json change --- .vscode/settings.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 2c63c085..0967ef42 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,2 +1 @@ -{ -} +{}