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 = () => {
266266 setLeaderboardError ( null ) ;
267267
268268 try {
269- console . log ( '🔄 Fetching leaderboard data from RecodeHive GitHub API...' ) ;
270269
270+
271+ console . log ( '🔄 Fetching leaderboard data from RecodeHive GitHub API...' ) ;
272+
271273 // Fetch all repositories from RecodeHive organization
272274 const reposResponse = await fetch ( 'https://api.github.com/orgs/recodehive/repos?type=public&per_page=100' ) ;
273-
275+
274276 if ( ! reposResponse . ok ) {
275277 if ( reposResponse . status === 403 ) {
276278 console . warn ( 'GitHub API rate limit exceeded. Using fallback data.' ) ;
@@ -406,8 +408,13 @@ const DashboardContent: React.FC = () => {
406408 // );
407409 setLeaderboardData ( transformedData ) ;
408410 } catch ( error ) {
409- console . error ( ' ❌ Error fetching RecodeHive contributors data:' , error ) ;
411+ console . error ( " ❌ Error fetching RecodeHive contributors data:" , error ) ;
410412 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.' ) ;
411418
412419 // Fallback demo data with similar structure
413420 console . log ( '📝 Loading demo data as fallback...' ) ;
You can’t perform that action at this time.
0 commit comments