flowfi icon indicating copy to clipboard operation
flowfi copied to clipboard

[Frontend] activity-content.tsx and incoming-content.tsx duplicate the same fetch/loading/error scaffolding with no shared hook

Open grantfox-oss[bot] opened this issue 4 months ago • 15 comments

Join our community: https://t.me/+DOylgFv1jyJlNzM0

Why this matters

frontend/src/app/activity/activity-content.tsx and frontend/src/app/incoming/incoming-content.tsx both implement their own loading/error/empty-state handling around a data fetch, following the same shape. Duplicated scaffolding means a bug fix (e.g. an error-state edge case) has to be applied twice and can drift, exactly the kind of duplication already flagged for other pairs in this codebase.

Acceptance criteria

  • [ ] Extract a shared useAsyncPageData-style hook or shared presentational wrapper for loading/error/empty states
  • [ ] Migrate both pages to use it
  • [ ] Confirm existing tests for both pages still pass

Files to touch

  • frontend/src/app/activity/activity-content.tsx
  • frontend/src/app/incoming/incoming-content.tsx
  • frontend/src/hooks/

Out of scope

  • Rewriting the data-fetching library used
  • Changing the visual design of loading/error states

grantfox-oss[bot] avatar Jul 29 '26 12:07 grantfox-oss[bot]

I want to extract a shared hook for loading/error/empty states because activity-content.tsx and incoming-content.tsx both implement their own handling following the same shape. Duplicated scaffolding means a bug fix has to be applied twice and can drift. The fix extracts a shared useAsyncPageData hook (or presentational wrapper) and migrates both pages to use it.

Relevant experience:

Hook extraction — extracted shared data-fetching hooks for 3 React apps; loading/error/empty states

Abdulrasaq1515 avatar Jul 29 '26 12:07 Abdulrasaq1515

@Ajibose has applied to work on this issue as part of the Stellar Wave Program's 7th wave.

can i work on this work

ℹ️ Repo Maintainers: To accept this application, review their application or assign @Ajibose to this issue.

Ajibose avatar Jul 29 '26 20:07 Ajibose

@Enemuo-debug has applied to work on this issue as part of the Stellar Wave Program's 7th wave.

Can I please work on this?

ℹ️ Repo Maintainers: To accept this application, review their application or assign @Enemuo-debug to this issue.

Enemuo-debug avatar Jul 29 '26 20:07 Enemuo-debug

@Maximum-Prosper has applied to work on this issue as part of the Stellar Wave Program's 7th wave.

I'd like to contribute to this project.

ℹ️ Repo Maintainers: To accept this application, review their application or assign @Maximum-Prosper to this issue.

Maximum-Prosper avatar Jul 29 '26 21:07 Maximum-Prosper

@Michvista has applied to work on this issue as part of the Stellar Wave Program's 7th wave.

Please assign to me

ℹ️ Repo Maintainers: To accept this application, review their application or assign @Michvista to this issue.

Michvista avatar Jul 29 '26 21:07 Michvista

Congratulations, @abdulqoyumadegoke! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on July 30, 2026.

🧑‍💻 @abdulqoyumadegoke: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

[!WARNING] When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

🌊 Happy Wave 🌊

drips-wave[bot] avatar Jul 29 '26 21:07 drips-wave[bot]

@bosedegift79-creator has applied to work on this issue as part of the Stellar Wave Program's 8th wave.

please assign this to me will make a pr within 2 hrs

ℹ️ Repo Maintainers: To accept this application, review their application or assign @bosedegift79-creator to this issue.

bosedegift79-creator avatar Aug 29 '26 13:08 bosedegift79-creator

@ajulaybeeb has applied to work on this issue as part of the Stellar Wave Program's 8th wave.

hi maintainer, i am a Full-Stack and web3 Developer, with 4+ years of experience. I have carefully read and understand the description of this issue, and i would like to take on this issue

ℹ️ Repo Maintainers: To accept this application, review their application or assign @ajulaybeeb to this issue.

ajulaybeeb avatar Aug 30 '26 05:08 ajulaybeeb

@Ezzycrypt7 has applied to work on this issue as part of the Stellar Wave Program's 9th wave.

Hi maintainer k would love to work on this issue. I would make sure it is implemented in due time neatly. Kindly assign.

ℹ️ Repo Maintainers: To accept this application, review their application or assign @Ezzycrypt7 to this issue.

Ezzycrypt7 avatar Sep 23 '26 19:09 Ezzycrypt7

@boluxx123 has applied to work on this issue as part of the Stellar Wave Program's 9th wave.

Please assign

ℹ️ Repo Maintainers: To accept this application, review their application or assign @boluxx123 to this issue.

Boluverss20 avatar Sep 29 '26 18:09 Boluverss20

Congratulations, @boluxx123! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on September 30, 2026.

🧑‍💻 @boluxx123: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

[!WARNING] When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

🌊 Happy Wave 🌊

drips-wave[bot] avatar Sep 29 '26 18:09 drips-wave[bot]

This issue has been removed from the Stellar Wave Program by the repository maintainers.

@Boluverss20, you have been unassigned from this issue. If you have any questions, please reach out to the repo maintainers.

drips-wave[bot] avatar Nov 18 '26 16:11 drips-wave[bot]

@MFrancis-dev has applied to work on this issue as part of the Stellar Wave Program's 11th wave.

Hi maintainer, I can get this issue fixed quickly. Please assign it to me

ℹ️ Repo Maintainers: To accept this application, review their application or assign @MFrancis-dev to this issue.

MFrancis-dev avatar Nov 21 '26 12:11 MFrancis-dev

Congratulations, @MFrancis-dev! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on November 25, 2026.

🧑‍💻 @MFrancis-dev: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

[!WARNING] When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

🌊 Happy Wave 🌊

drips-wave[bot] avatar Nov 21 '26 12:11 drips-wave[bot]

This issue has been completed by @MFrancis-dev as part of the Stellar Wave Program's 11th Wave 🥳

😎 @MFrancis-dev: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.

🧑‍💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.

drips-wave[bot] avatar Nov 21 '26 16:11 drips-wave[bot]