File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -266,11 +266,13 @@ const DashboardContent: React.FC = () => {
266
266
setLeaderboardError ( null ) ;
267
267
268
268
try {
269
- console . log ( '🔄 Fetching leaderboard data from RecodeHive GitHub API...' ) ;
270
269
270
+
271
+ console . log ( '🔄 Fetching leaderboard data from RecodeHive GitHub API...' ) ;
272
+
271
273
// Fetch all repositories from RecodeHive organization
272
274
const reposResponse = await fetch ( 'https://api.github.com/orgs/recodehive/repos?type=public&per_page=100' ) ;
273
-
275
+
274
276
if ( ! reposResponse . ok ) {
275
277
if ( reposResponse . status === 403 ) {
276
278
console . warn ( 'GitHub API rate limit exceeded. Using fallback data.' ) ;
@@ -406,8 +408,13 @@ const DashboardContent: React.FC = () => {
406
408
// );
407
409
setLeaderboardData ( transformedData ) ;
408
410
} catch ( error ) {
409
- console . error ( ' ❌ Error fetching RecodeHive contributors data:' , error ) ;
411
+ console . error ( " ❌ Error fetching RecodeHive contributors data:" , error ) ;
410
412
setLeaderboardError ( error . message ) ;
413
+
414
+ // Load fallback demo data
415
+ console . log ( "📝 Loading demo data as fallback..." ) ;
416
+ console . warn ( 'Using fallback leaderboard data due to GitHub API limitations' ) ;
417
+ setLeaderboardError ( 'GitHub API rate limit reached. Showing demo data.' ) ;
411
418
412
419
// Fallback demo data with similar structure
413
420
console . log ( '📝 Loading demo data as fallback...' ) ;
You can’t perform that action at this time.
0 commit comments