1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-08-24 18:03:06 +02:00

Add streaks for lifetime

This commit is contained in:
Kamran Ahmed
2024-09-12 19:09:04 +01:00
parent dd5232f2f8
commit 989f7ad5c1
2 changed files with 12 additions and 3 deletions

View File

@@ -9,7 +9,10 @@ export type LeadeboardUserDetails = {
}; };
export type ListLeaderboardStatsResponse = { export type ListLeaderboardStatsResponse = {
longestStreaks: LeadeboardUserDetails[]; streaks: {
active: LeadeboardUserDetails[];
lifetime: LeadeboardUserDetails[];
};
projectSubmissions: { projectSubmissions: {
currentMonth: LeadeboardUserDetails[]; currentMonth: LeadeboardUserDetails[];
lifetime: LeadeboardUserDetails[]; lifetime: LeadeboardUserDetails[];

View File

@@ -34,8 +34,14 @@ export function LeaderboardPage(props: LeaderboardPageProps) {
title="Longest Visit Streak" title="Longest Visit Streak"
tabs={[ tabs={[
{ {
title: 'All Time', title: 'Active',
users: stats.longestStreaks, users: stats.streaks?.active || [],
emptyIcon: <Zap className="size-16 text-gray-300" />,
emptyText: 'No users with streaks yet',
},
{
title: 'Lifetime',
users: stats.streaks?.lifetime || [],
emptyIcon: <Zap className="size-16 text-gray-300" />, emptyIcon: <Zap className="size-16 text-gray-300" />,
emptyText: 'No users with streaks yet', emptyText: 'No users with streaks yet',
}, },