fix(bio-links): surface error toasts on analytics fetch, clipboard copy, and SVG QR export failures
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 86/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- nextjs, react, typescript
- Domain
- frontend
Research direction
Start with fetchAnalytics in apps/web/components/bio-links/BioAnalyticsView.tsx, then inspect handleCopy and handleDownloadSvg in apps/web/components/bio-links/ShareModal.tsx. Check how nearby bio-links components display errors and follow the existing toast pattern. Done when failed analytics requests, clipboard copies, and SVG exports each show a user-visible error.
Written by the indexing model from the issue text.
Description
Problem Description
-
BioAnalyticsView.tsx(apps/web/components/bio-links/BioAnalyticsView.tsx):
fetchAnalyticsonly callssetData(json)insideif (res.ok)and only logsconsole.error(...)in thecatchblock. On!res.okor network failure, notoast.error(...)or visible error state is shown to the user. -
ShareModal.tsx(apps/web/components/bio-links/ShareModal.tsx):handleCopyswallows clipboard errors in an emptycatch { // fallback }block with no user feedback.handleDownloadSvgonly callsconsole.error('Failed to export SVG QR code:', err)on failure without notifying the user viatoast.error(...).
Expected Behavior
BioAnalyticsView.tsxthrows on!res.okand shows atoast.error(...)(and/or an error state) when analytics fail to load.ShareModal.tsxshows atoast.error(...)when copying the public URL or exporting the SVG QR code fails.
Where to Look
apps/web/components/bio-links/BioAnalyticsView.tsx(fetchAnalytics)apps/web/components/bio-links/ShareModal.tsx(handleCopy,handleDownloadSvg)
Solution / Implementation Guide
- In
BioAnalyticsView.tsx(fetchAnalytics):- If
!res.ok, throw an error (safely parsing error JSON with.catch(() => ({}))). - In
catch, calltoast.error('Failed to load bio-links analytics')(or set an error state to render a retry message).
- If
- In
ShareModal.tsx:- Import
toast(matching the rest ofapps/web/components/bio-links/). - Call
toast.error(...)in thecatchblocks ofhandleCopyandhandleDownloadSvg.
- Import
- Dominant language
- TypeScript
- Stars
- 2
- Forks
- 1
- Avg merge
- 6m
- Merged PRs (30d)
- 27
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from sumamakhan761/tryinstance
-
backend good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
sumamakhan761/tryinstance#65 ·
Maintainers usually reply within 1 day
-
backend good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
sumamakhan761/tryinstance#64 ·
Maintainers usually reply within 1 day
-
backend good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
sumamakhan761/tryinstance#63 ·
Maintainers usually reply within 1 day
-
backend good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
sumamakhan761/tryinstance#62 ·
Maintainers usually reply within 1 day
-
backend good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
sumamakhan761/tryinstance#60 ·
Maintainers usually reply within 1 day
All issues in sumamakhan761/tryinstance
Similar issues
-
prio:low scope:hud
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
OliverRomhagen/vrigstad-joyride#953 ·
Maintainers usually reply within 1 day
-
review-followup
Difficulty 1/5 Under an hour Newbie friendliness 92/100
griffinwork40/agent-afk#5446 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
kacper-szewczyk/Ticknest#346 ·
Maintainers usually reply within 1 day
-
echarts geo: a GeoJSON URL that returns 200 with a body that is not JSON is fetched on each refreshOpenbug plugin/echarts/geo
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Yeachan-Heo/gajae-code#8230 ·
Maintainers usually reply within 1 day