Skip to content

refactor: unify offer and gift card rendering patterns#973

Merged
gudnuf merged 1 commit intofeat/offers-ui-v2from
fix/unify-offer-gift-card-pattern
Apr 1, 2026
Merged

refactor: unify offer and gift card rendering patterns#973
gudnuf merged 1 commit intofeat/offers-ui-v2from
fix/unify-offer-gift-card-pattern

Conversation

@orveth
Copy link
Copy Markdown

@orveth orveth commented Mar 31, 2026

Summary

  • Consolidated offer card images into the existing gift card CARD_IMAGES map with getCardByUrl() lookup
  • Replaced OfferItem with GiftCardItem + hideOverlayContent prop for consistent card rendering
  • Collapsed 3-way render branch in receive-cashu-token.tsx to 2-way (gift-card/offer share the same card image path)
  • Deleted offer-card-images.ts and offer-item.tsx (no longer needed)

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

Test plan

  • Verify offer cards render correctly on the gift cards page
  • Verify offer details page shows the correct card image
  • Verify receive cashu token screen renders card images for both gift cards and offers

🤖 Generated with Claude Code

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>
@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 Mar 31, 2026 11:43pm

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 ↗︎.

Copy link
Copy Markdown
Author

@orveth orveth left a comment

Choose a reason for hiding this comment

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

keeper:review: PASS

Verified:

  • All offer-card-images.ts / offer-item.tsx references removed (grepped full app/ tree)
  • CARD_IMAGES consolidation covers the localhost:8104 entry from deleted file
  • hideOverlayContent properly typed (boolean?) and consumed in GiftCardItem
  • 2-way render in receive-cashu-token.tsx covers all prior 3-way cases
  • loadOfferCardsFromEnv() retained — startup validation still enforced

Clean unification. Needs gudnuf or josip approval to merge.

@gudnuf gudnuf merged commit 5a7bcb4 into feat/offers-ui-v2 Apr 1, 2026
7 checks passed
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.

2 participants