Skip to content

feat: add offers UI with card display and details page#968

Open
gudnuf wants to merge 3 commits intoadd-offer-accountsfrom
feat/offers-ui-v2
Open

feat: add offers UI with card display and details page#968
gudnuf wants to merge 3 commits intoadd-offer-accountsfrom
feat/offers-ui-v2

Conversation

@gudnuf
Copy link
Copy Markdown
Contributor

@gudnuf gudnuf commented Mar 31, 2026

Follow up to #959

I decided to nest offers under gift-cards because that's the current UI layout, but also I added separate configs for offer mints because the behavior is slightly different.

…pers

- Add offer details page with Fund/Pay buttons (Fund shown when NUT-04 minting enabled)
- Add getAccountHomePath utility to centralize purpose-based redirects
- Add offer card config/images with build-time image enforcement
- Add useActiveOffers hook with ISO 8601 expiry filtering
- Wire offer redirects across send, receive, and buy flows
@gudnuf gudnuf requested a review from jbojcic1 March 31, 2026 00:03
@gudnuf gudnuf self-assigned this Mar 31, 2026
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 31, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agicash Ready Ready Preview, Comment Apr 1, 2026 2:13am

Request Review

@supabase
Copy link
Copy Markdown

supabase bot commented Mar 31, 2026

This pull request has been ignored for the connected project hrebgkfhjpkbxpztqqke because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@gudnuf gudnuf linked an issue Mar 31, 2026 that may be closed by this pull request
<DiscoverGiftCards giftCards={giftCardsToDiscover} />
)}

{activeOffers.length > 0 && (
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if there is more than one offer this will just render like this:

Image

Bob and I talked about it and decided we will only have one active offer at a time for now and if we end up with more offers we can decide how to handle it in the ui. One idea was a scrollable row like the discover section

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acknowledged — single offer at a time for now. If we add multiple offers later, we can revisit the layout (scrollable row or similar).

};

const OFFER_CARD_IMAGES: Record<string, string> = {
'http://localhost:8104': sfFreeCoffeeCard,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blocked. waiting on https://github.com/MakePrisms/agicash-mints/pull/49 before we can have a real mint url

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acknowledged — placeholder URL until agicash-mints#49 lands.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@orveth can you make sure that offer cards follow the same pattern as gift card images in terms of fetching the images and loading them

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done — unified in PR #973. Offer card images now use the same CARD_IMAGES map and getCardByUrl() lookup as gift cards. Deleted offer-card-images.ts and offer-item.tsx.

</p>
)}
</div>
) : sourceAccount.purpose === 'offer' ? (
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@orveth this is inconsistent with how we render the giftCard. We should rethink that. I wonder if we can make it so that if its a card in general either a gift-card or a offer card either way we want to render the card image in the same way

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done — unified in PR #973. Collapsed the 3-way render branch to 2-way: both gift cards and offer cards now share the same card image rendering path via GiftCardItem with hideOverlayContent prop.

Consolidate offer card images into the existing gift card system.
Replace OfferItem with GiftCardItem + hideOverlayContent prop.
Collapse the 3-way render branch in receive-cashu-token to 2-way.

Addresses review comments #3 and #4 on PR #968.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…tern

refactor: unify offer and gift card rendering patterns
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wire offer accounts into gift card UI

2 participants