From 12a15d25df742e5eafec84ec55840d60bf23f609 Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Thu, 3 Oct 2024 22:45:42 +0100 Subject: [PATCH] Add leaderboard page --- src/api/leaderboard.ts | 4 +- .../Leaderboard/LeaderboardPage.tsx | 40 +------------------ 2 files changed, 4 insertions(+), 40 deletions(-) diff --git a/src/api/leaderboard.ts b/src/api/leaderboard.ts index 669683840..5589ab174 100644 --- a/src/api/leaderboard.ts +++ b/src/api/leaderboard.ts @@ -21,8 +21,8 @@ export type ListLeaderboardStatsResponse = { currentMonth: LeaderboardUserDetails[]; }; referrals: { - currentMonth: LeadeboardUserDetails[]; - lifetime: LeadeboardUserDetails[]; + currentMonth: LeaderboardUserDetails[]; + lifetime: LeaderboardUserDetails[]; }; }; diff --git a/src/components/Leaderboard/LeaderboardPage.tsx b/src/components/Leaderboard/LeaderboardPage.tsx index 79fa5874d..7ac4b635f 100644 --- a/src/components/Leaderboard/LeaderboardPage.tsx +++ b/src/components/Leaderboard/LeaderboardPage.tsx @@ -24,7 +24,7 @@ export function LeaderboardPage(props: LeaderboardPageProps) { Leaderboard -
+
-
-
- , - emptyText: 'No users with streaks yet', - }, - { - title: 'Lifetime', - users: stats.streaks?.lifetime || [], - emptyIcon: , - emptyText: 'No users with streaks yet', - }, - ]} - /> - , - emptyText: 'No projects submitted this month', - }, - { - title: 'Lifetime', - users: stats.projectSubmissions.lifetime, - emptyIcon: , - emptyText: 'No projects submitted yet', - }, - ]} - />
-

+

{title}{' '} {subtitle && (