feat: add campaign discovery / marketplace list at /campaigns - #238
Merged
Dannyswiss1 merged 1 commit intoAug 29, 2026
Merged
Conversation
3 tasks
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.
Campaign discovery / marketplace list (#142)
CampaignsPage(pages/index.tsx) was a staticPlaceholderPage— the apphad no page anywhere for an investor to browse available campaigns. Every
other flow (funding, detail, dashboard) assumed you already had a campaign id.
This adds a real, live list at
/campaigns.Changes
hooks/useAllCampaigns.ts(new)ProductionEscrowContractevent history and fetches current state viaget_campaign. Same event-scan approach asuseAdminCampaigns.tsbut without theACTIONABLE_STATUSESadmin filter; sorted newest-id-first, guarded byisEscrowConfigured(), unresolvable ids skipped instead of failing the whole load.pages/CampaignsPage.tsx(new)<StatusBadge>+ arole="progressbar"funding bar and links to/campaigns/:id. Handles loading (CampaignCardsSkeleton), error (message + Retry viarefetch), empty (no campaigns yet + create CTA), and not-configured (env-var hint) states. Status filter chips built onSTATUS_META, shown only when >1 status is present.App.tsx<Route path="/campaigns" element={<CampaignsPage />} />added to theAppLayoutgroup (nav already linked there).pages/index.tsxCampaignsPageremoved; nowexport { CampaignsPage } from './CampaignsPage', matching theActivityFeedPage/FarmerProfilePagepattern.hooks/contract/queryKeys.tsallCampaignsquery key.__tests__/CampaignsPage.test.tsx(new)/campaigns/:idhrefs, plus the empty / error / loading states.Acceptance criteria
/campaignsrenders a real, live list of on-chain campaigns, not placeholder copy/campaigns/:iddetail pageVerification
tsc --noEmit— cleaneslint— clean on all touched filesCloses #142