mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-29 18:13:47 +00:00
fix: gift code display + share modal backdrop
- Don't uppercase gift codes (tokens are case-sensitive base64) - Lighten share modal backdrop (bg-dark-900/40 instead of bg-black/60)
This commit is contained in:
@@ -10,7 +10,7 @@ import { AnimatedCrossmark } from '@/components/ui/AnimatedCrossmark';
|
|||||||
import { cn } from '@/lib/utils';
|
import { cn } from '@/lib/utils';
|
||||||
|
|
||||||
function formatGiftCode(token: string): string {
|
function formatGiftCode(token: string): string {
|
||||||
return `GIFT-${token.slice(0, 12).toUpperCase()}`;
|
return `GIFT-${token.slice(0, 12)}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
const MAX_POLL_MS = 10 * 60 * 1000; // 10 minutes
|
const MAX_POLL_MS = 10 * 60 * 1000; // 10 minutes
|
||||||
|
|||||||
@@ -1015,7 +1015,7 @@ function ShareModal({ gift, onClose }: { gift: SentGift; onClose: () => void })
|
|||||||
onClick={onClose}
|
onClick={onClose}
|
||||||
>
|
>
|
||||||
{/* Backdrop */}
|
{/* Backdrop */}
|
||||||
<div className="absolute inset-0 bg-black/60 backdrop-blur-sm" />
|
<div className="absolute inset-0 bg-dark-900/40 backdrop-blur-sm" />
|
||||||
|
|
||||||
{/* Modal content */}
|
{/* Modal content */}
|
||||||
<motion.div
|
<motion.div
|
||||||
@@ -1131,7 +1131,7 @@ function SentGiftCard({ gift }: { gift: SentGift }) {
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const [showShareModal, setShowShareModal] = useState(false);
|
const [showShareModal, setShowShareModal] = useState(false);
|
||||||
|
|
||||||
const giftCode = `GIFT-${gift.token.slice(0, 12).toUpperCase()}`;
|
const giftCode = `GIFT-${gift.token.slice(0, 12)}`;
|
||||||
const isActivated = isGiftActivated(gift);
|
const isActivated = isGiftActivated(gift);
|
||||||
const isAvailable = !isActivated && isGiftAvailable(gift.status);
|
const isAvailable = !isActivated && isGiftAvailable(gift.status);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user