Skip to content

Commit 316ad0c

Browse files
committed
Filter feature in leaderboard
1 parent e7b128d commit 316ad0c

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/pages/dashboard/index.tsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ const DashboardContent: React.FC = () => {
266266
setLeaderboardError(null);
267267

268268
try {
269-
console.log("🔄 Fetching leaderboard data from RecodeHive GitHub API...");
269+
270270

271271
// Fetch all repositories from RecodeHive organization
272272
const reposResponse = await fetchWithRateLimit(
@@ -278,11 +278,11 @@ const DashboardContent: React.FC = () => {
278278
}
279279

280280
const repos = await reposResponse.json();
281-
console.log(
282-
"📊 GitHub Repos Response:",
283-
repos.length,
284-
"repositories found"
285-
);
281+
// console.log(
282+
// "📊 GitHub Repos Response:",
283+
// repos.length,
284+
// "repositories found"
285+
// );
286286

287287
if (!Array.isArray(repos)) {
288288
throw new Error("Invalid GitHub API response format");
@@ -307,7 +307,7 @@ const DashboardContent: React.FC = () => {
307307
.sort((a, b) => b.stargazers_count - a.stargazers_count)
308308
.slice(0, 10); // Limit to top 10 repos to reduce API calls
309309

310-
console.log(`📊 Processing top ${topRepos.length} repositories...`);
310+
// console.log(`📊 Processing top ${topRepos.length} repositories...`);
311311

312312
// Fetch contributors for each repository with delay to avoid rate limits
313313
for (let i = 0; i < topRepos.length; i++) {
@@ -397,11 +397,11 @@ const DashboardContent: React.FC = () => {
397397
.sort((a, b) => b.contributions - a.contributions) // Sort by contributions descending
398398
.map((item, index) => ({ ...item, rank: index + 1 })); // Update ranks after sorting
399399

400-
console.log(
401-
"✅ Successfully processed RecodeHive contributors data:",
402-
transformedData.length,
403-
"contributors"
404-
);
400+
// console.log(
401+
// "✅ Successfully processed RecodeHive contributors data:",
402+
// transformedData.length,
403+
// "contributors"
404+
// );
405405
setLeaderboardData(transformedData);
406406
} catch (error) {
407407
console.error("❌ Error fetching RecodeHive contributors data:", error);

0 commit comments

Comments
 (0)