-
- {/* Filter Buttons positioned to the right */}
-
+
- {/* Loading State */}
- {isLoadingLeaderboard && (
-
- {/* Error State */}
- {leaderboardError && !isLoadingLeaderboard && (
-
- ⚠️
- Unable to Load Latest Data
- {leaderboardError}
- {!rateLimitInfo.isLimited && (
-
- )}
-
- Showing cached data below. The leaderboard will
- automatically refresh when possible.
+ {/* Leaderboard Section */}
+
+
+
+ 🏆 Top Contributors{" "}
+ Leaderboard
+
+
+ Celebrating our most active community members who make
+ RecodeHive awesome!
-
- )}
+
- {/* Leaderboard Content */}
- {!isLoadingLeaderboard && filteredLeaderboardData.length > 0 && (
-
-
-
-
- {filteredLeaderboardData.length}
-
- Participants
-
-
-
- {getContributionCount(
- filteredLeaderboardData[0],
- filterPeriod
- ) || 0}
-
-
- Top{" "}
- {filterPeriod.charAt(0).toUpperCase() +
- filterPeriod.slice(1)}
-
-
-
-
- {Math.round(
- filteredLeaderboardData.reduce(
- (acc, user) =>
- acc + getContributionCount(user, filterPeriod),
- 0
- ) / filteredLeaderboardData.length
- )}
-
-
- Avg{" "}
- {filterPeriod.charAt(0).toUpperCase() +
- filterPeriod.slice(1)}
-
+
+ {error && (
+
+
⚠️ Some data may be cached or incomplete
-
-
-
- {filteredLeaderboardData.map((entry, index) => (
-
- {/* Streak Display */}
- {entry.streak && entry.streak > 1 && (
-
- {entry.streak} Day Streak
-
- )}
+ )}
-
-
-
-

-
-
-
-
{entry.name}
- {entry.username && entry.username !== entry.name && (
-
@{entry.username}
- )}
-
-
-
- {getContributionCount(entry, filterPeriod)}
-
-
- {filterPeriod === "weekly"
- ? "this week"
- : filterPeriod === "monthly"
- ? "this month"
- : "total"}
-
-
-
-
-
-
- {entry.contributions}
-
- Total PRs
-
-
-
- {entry.repositories}
-
- Repos
-
-
-
- {entry.achievements.length > 0 && (
-
- {entry.achievements.map((achievement, i) => (
-
- {achievement}
-
- ))}
-
- )}
-
-
-
-
- ))}
-
-
- )}
-
- {/* Empty State */}
- {!isLoadingLeaderboard &&
- !leaderboardError &&
- filteredLeaderboardData.length === 0 && (
-
- 📊 No data available
- The leaderboard is empty. Check back later!
-
- )}
-
- ) : activeTab === "home" ? (
- // Home tab content
-
-
-
-
- Community Dashboard
-
-
- Track our community's growth, celebrate top contributors,
- and explore project statistics
-
-
-
-
- {/* Stats Grid */}
-
-
-
-
-
-
-
-
-
- {/* Leaderboard Section */}
-
-
-
- 🏆 Top Contributors{" "}
- Leaderboard
-
-
- Celebrating our most active community members who make
- RecodeHive awesome!
-
-
-
-
- {error && (
-
-
⚠️ Some data may be cached or incomplete
-
- )}
-
- {dashboardStats.topContributors.map((entry, index) => (
-
- ))}
-
-
+ {dashboardStats.topContributors.map((entry, index) => (
+
+ ))}
+
+
{/* Call to Action */}
{
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.6 }}
>
-
-
- Community Discussions
+
+
+ Community{" "}
+
+ Discussions
+
-
- Join the conversation, ask questions, and share your thoughts with the RecodeHive community.
+
+ Join the conversation, ask questions, and share your thoughts
+ with the RecodeHive community.
@@ -1440,7 +1275,11 @@ const DashboardContent: React.FC = () => {
/>
-