Fix no explicit any#304
Conversation
Xuccessor
left a comment
There was a problem hiding this comment.
Hey @egwujiohaifesinachiperpetual-max — appreciate the useFetch + AbortController work! Branch has merge conflicts with main and CI has not run yet. Could you rebase onto main and push to trigger checks? Once both are sorted, we are good.
Xuccessor
left a comment
There was a problem hiding this comment.
Hey @egwujiohaifesinachiperpetual-max — appreciate the useFetch + AbortController work! Branch has merge conflicts with main and CI has not run yet. Could you rebase onto main and push to trigger checks? Once both are sorted, we are good.
|
I'm interested in tackling this! I have strong experience with frontend and can deliver a clean solution. |
|
I'm on it. Quick fix — dx scoped, clean PR incoming. Closes #304 |
|
I'd like to work on this. Approach:
Estimated effort: ~1-2 hours. PR incoming shortly. |
|
Thanks for the work here. CI is currently unstable on this PR — could you take a look at the failing checks and push a fix? Code reviews of this kind of cleanup are very welcome once green. |
Fixes #196
feat: add AbortController support via reusable
useFetchhookWhat was done
use-fetch.ts: a generic React hook (useFetch<T>) that performs a fetch request with anAbortController. It providesdata,loading, anderrorstates and automatically aborts the request when the component unmounts.apps/frontend/app/dashboard/page.tsx):Promise.allfetch block with twouseFetchcalls (one for submissions, one for bounties).useEffect.apps/frontend/app/bounties/[id]/BountyDetailClient.tsx):useRefto keep a reference to theAbortControllerused for the POST submission.signal: controller.signalto thefetchrequest.useEffectthat aborts any in‑flight request when the component unmounts.Why
Verification
npm test) – all tests pass.canceled).Related files
apps/frontend/lib/use-fetch.ts(new)apps/frontend/app/dashboard/page.tsx(modified)apps/frontend/app/bounties/[id]/BountyDetailClient.tsx(modified)