feat: add offers UI with card display and details page#968
feat: add offers UI with card display and details page#968gudnuf wants to merge 3 commits intoadd-offer-accountsfrom
Conversation
…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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
| <DiscoverGiftCards giftCards={giftCardsToDiscover} /> | ||
| )} | ||
|
|
||
| {activeOffers.length > 0 && ( |
There was a problem hiding this comment.
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
blocked. waiting on https://github.com/MakePrisms/agicash-mints/pull/49 before we can have a real mint url
There was a problem hiding this comment.
Acknowledged — placeholder URL until agicash-mints#49 lands.
There was a problem hiding this comment.
@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
There was a problem hiding this comment.
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' ? ( |
There was a problem hiding this comment.
@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
There was a problem hiding this comment.
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.
…tern refactor: unify offer and gift card rendering patterns

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.