fix: YouTube subscriber count is hardcoded and outdated #1956
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #1954
Key changes:
Implemented YouTube Data API integration
Added environment variable configuration
Created reusable YouTube data fetching utilities
Added proper error handling and loading states
Implemented number formatting for subscriber counts (K/M suffixes)
Type of change
Bug fix (non-breaking change which fixes an issue)
New feature (non-breaking change which adds functionality)
How should this be tested
Set up environment variables:
``
YOUTUBE_API_KEY=your_api_key
YOUTUBE_CHANNEL_ID=your_channel_id
``
Test the following scenarios:
Verify subscriber count displays correctly
Verify video count displays correctly
Test with invalid API key (should fail gracefully)
Test loading state appears while fetching data
Verify mobile responsiveness
Mandatory Tasks
Self-reviewed the code
Verified no console errors
Tested multiple viewport sizes
Checklist
My code follows the style guidelines of this project
I have commented my code, particularly in hard-to-understand areas
My changes generate no new warnings
I have checked that my changes don't break existing functionality
Screnshot
After
