Fix Badge Loading Issue by Resetting Generation Key - #8730
Conversation
|
@sureshsuriya is attempting to deploy a commit to the jhasourav07's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
This pull request resolves an issue with badge generation that could lead to an infinite loading state when the same username is used multiple times. The changes include resetting the generation key and appending a cache-busting parameter to ensure fresh badge requests. This approach is similar to past decisions made to enforce uniqueness in selections, which aimed to prevent duplicate entries and improve user experience. Thank you for your contribution! |
📦 Next.js Bundle Size Report (Gzipped Sizes)✨ No significant bundle size changes detected. 📊 Summary of Totals
|
Aamod007
left a comment
There was a problem hiding this comment.
Thank you for fixing the infinite loading issue with the badge! Adding the \generationKey\ and using it as a cache-busting \ \ parameter in \�pp/components/LandingPageClient.tsx\ is a very clever way to ensure the browser fetches a fresh image. The addition of the regression test in \�pp/page.test.tsx\ also gives us great confidence in this fix. Looks fantastic!
Description
Fixes #5694
This PR fixes an issue where clicking "Generate Badge" multiple times with the same GitHub username caused the badge to remain in an infinite loading/suspended state.
Changes
generationKeystate to force a fresh badge request on every generation.tquery parameter to the badge URL so the browser always fetches a fresh image.Pillar
Visual Preview
N/A (Bug fix only)
Checklist before requesting a review:
CONTRIBUTING.mdfile.localhost:3000/api/streak?user=YOUR_USERNAME).npm run formatandnpm run lintlocally and resolved all errors.README.mdif I added a new theme or URL parameter. (Not applicable)