fix: update GitHub stars count in header component#706
fix: update GitHub stars count in header component#706dipanshurdev wants to merge 1 commit intoOpenCut-app:mainfrom
Conversation
👷 Deploy request for appcut pending review.Visit the deploys page to approve it
|
|
@dipanshurdev is attempting to deploy a commit to the OpenCut OSS Team on Vercel. A member of the Team first needs to authorize it. |
📝 WalkthroughWalkthroughUpdates the displayed GitHub follower count in the header component from "40k+" to "45.9k+". This is a straightforward value update to reflect current follower metrics in the social buttons section. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
apps/web/src/components/header.tsx (1)
71-74: Consider fetching the GitHub star count dynamically instead of hardcoding it.This value has already gone stale once (40k+ → 45.9k+) and will again. You could fetch it at build time or via the GitHub API (e.g., using an ISR route or a server component) so it stays current without manual patches.
If you prefer to keep it static for simplicity, at minimum add a comment noting this is a manually-maintained value so future contributors know to update it.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/web/src/components/header.tsx` around lines 71 - 74, The GitHub star count is hardcoded in the Header component render (the Button containing HugeiconsIcon/GithubIcon) and should be made dynamic or at least documented; replace the literal "45.9k+" with a prop/state value fetched from the GitHub API (e.g., call the REST API for repo.stargazers_count in a server component, getStaticProps/getStaticPaths or an ISR route and pass it into the Header, or fetch on mount and set state) and ensure caching/TTL to avoid rate limits, or if you opt to keep it static, add a clear inline comment above the Button explaining that the value is manually maintained and must be updated when stars change. Ensure you update references in header.tsx where the Button/GithubIcon/HugeiconsIcon are rendered so the UI uses the fetched prop (e.g., starsCount) instead of the hardcoded string.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@apps/web/src/components/header.tsx`:
- Around line 71-74: The GitHub star count is hardcoded in the Header component
render (the Button containing HugeiconsIcon/GithubIcon) and should be made
dynamic or at least documented; replace the literal "45.9k+" with a prop/state
value fetched from the GitHub API (e.g., call the REST API for
repo.stargazers_count in a server component, getStaticProps/getStaticPaths or an
ISR route and pass it into the Header, or fetch on mount and set state) and
ensure caching/TTL to avoid rate limits, or if you opt to keep it static, add a
clear inline comment above the Button explaining that the value is manually
maintained and must be updated when stars change. Ensure you update references
in header.tsx where the Button/GithubIcon/HugeiconsIcon are rendered so the UI
uses the fetched prop (e.g., starsCount) instead of the hardcoded string.
📊 Update GitHub Stars Count
Description
Updates the GitHub stars badge in the header component to reflect the current repository stars (now at 45.9k+).
Changes
40k+→45.9k+in header.tsxType of Change
Testing
Summary by CodeRabbit
Release Notes