fix(gift-cards): show mint name when card has no image#1079
Open
orveth wants to merge 1 commit into
Open
Conversation
|
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. |
39cc6e9 to
386fcfc
Compare
e28b5b2 to
405c7be
Compare
405c7be to
1670e30
Compare
1670e30 to
8938ae3
Compare
8938ae3 to
9fa3e11
Compare
9fa3e11 to
07e3fda
Compare
07e3fda to
e1fff4d
Compare
e1fff4d to
a565bbf
Compare
a565bbf to
143b608
Compare
143b608 to
5f48e00
Compare
5f48e00 to
253c3c4
Compare
253c3c4 to
64bbc46
Compare
64bbc46 to
ddf77aa
Compare
Both OfferItem and the selected-state GiftCardItem now render the mint name centered over a blank card when no image is available. Previously OfferItem used text-card-foreground (invisible on the blank card's foreground background) and the selected GiftCardItem overlay's opacity:0 + transparent background left the card fully blank.
ddf77aa to
9ba8904
Compare
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.
What
Make the mint name visible when a gift-card-purpose mint has no image configured.
app/features/gift-cards/offer-item.tsx— swaptext-card-foreground→text-foreground(1 line). The imageless overlay was already there but rendered white-on-white in:root.app/features/gift-cards/offers-section.tsx— same swap on the inlinedOfferCardButtonoverlay JSX (the duplicate ofOfferItem's imageless branch).app/features/gift-cards/gift-card-item.tsx— when!image && hideOverlayContent(the selected card on/gift-cards/<id>with no configured mint image), early-return a card with a centered name overlay and no balance. The existing stack-style overlay logic is unchanged for every other case.Why
In the default
:root:--card: hsl(0 0% 100%)--card-foreground: hsl(0 0% 98%)So
text-card-foregroundonbg-cardrendered the offer card's name invisible.--foreground: hsl(0 0% 3.9%)gives contrast in:rootand remains a sensible foreground in every defined theme.For the gift-card details page, the selected card passes
hideOverlayContent=trueto suppress the stack-style overlay so an image can identify the card cleanly. With no image, the overlay being suppressed meant nothing identified the card. The early-return covers that one case with a name-only overlay — no balance (the balance is shown separately below on the details page), no gradient, just the name centered on the blank card. Every other call site (the stack list, non-selected cards in details) is unaffected.