showcase: drop redundant stars badge#213
Closed
aryanmehrotra wants to merge 1 commit into
Closed
Conversation
The header already shows a live, accurate star count via its own fetch. The showcase page rendered a second badge backed by a client-side localStorage cache that was never refreshed, so users hitting /showcase saw a stale number (e.g. 14.2K against the header's 21.5K). Removing the badge also lets the page lose 'use client', the useState/useEffect pair, and the formatNumber import — /showcase becomes a fully-static route (478 B vs 4.85 kB before). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Removes a redundant GitHub stars badge from the /showcase page to avoid displaying stale star counts and to keep the route fully static (relying on the header’s live star count instead).
Changes:
- Removed client-side stars badge logic (localStorage cache + GitHub API fetch) from the
/showcasehero. - Dropped
'use client'and related React hooks/imports so/showcasecan render as a server component/static route. - Added an inline hero comment explaining why the star count is no longer repeated on the page.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
3 tasks
Member
Author
|
Superseded by #215 — all commits from this branch are stacked there as part of a single QA-bundle PR. Closing without deleting the branch. |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
/showcasepage rendered a second badge backed by a client-side localStorage cache that was never refreshed — so visitors saw a stale number (e.g. 14.2K on /showcase vs 21.5K in the header).'use client', theuseState/useEffectpair, or theformatNumberimport —/showcasebecomes a fully-static route (478 B down from 4.85 kB).Test plan
npx next build— succeeds;/showcaselisted as ○ (static), 478 B.🤖 Generated with Claude Code