diff --git a/app/(main)/leaderboard/page.js b/app/(main)/leaderboard/page.js
index c07a06f..cdf45af 100644
--- a/app/(main)/leaderboard/page.js
+++ b/app/(main)/leaderboard/page.js
@@ -12,7 +12,7 @@ export default function LeaderboardPage() {
const searchParams = useSearchParams();
const huntJustEnded = searchParams.get("huntEnded") === "true";
const router = useRouter();
- const { status } = useSession();
+ const { data: session, status } = useSession(); // Fix: Properly destructure session from useSession()
// Function to fetch leaderboard data
const fetchLeaderboard = async () => {
@@ -70,7 +70,9 @@ export default function LeaderboardPage() {
-
Leaderboard
+
+ {huntJustEnded ? "Final Results" : "Leaderboard"}
+
{huntJustEnded && (
@@ -156,32 +158,46 @@ export default function LeaderboardPage() {
No teams on the leaderboard yet
)}
- {/* Navigation Bar */}
-
-
-
πΊοΈ
-
Map
-
-
-
π
-
Stats
-
-
0 && session?.user?.teamId
- ? `/${session.user.teamId}`
- : "/team-selection"
- }
- className="nav-item"
- >
-
π₯
-
Team
-
-
-
π
-
Leaderboard
-
-
+ {/* Only show navigation bar when the hunt hasn't ended */}
+ {!huntJustEnded && (
+
+
+
πΊοΈ
+
Map
+
+
+
π
+
Stats
+
+
+
π₯
+
Team
+
+
+
π
+
Leaderboard
+
+
+ )}
+
+ {/* Add a "back to home" button when the hunt has ended */}
+ {huntJustEnded && (
+
+
+
+ )}