From dee89fb1189845e24fd29cae12318565f93ba0e8 Mon Sep 17 00:00:00 2001 From: c0mrade Date: Mon, 2 Feb 2026 06:26:10 +0300 Subject: [PATCH] improve: enhance promo offers visibility and design MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Move PromoOffersSection higher on dashboard (after subscription card) - Replace SVG icons with expressive emojis (🏷️ for discounts, 🚀 for test access, 🎁 for general) - Redesign activate button with gradient, shimmer effect, and hover animation - Add shadow glow effect to make button more clickable --- src/components/PromoOffersSection.tsx | 47 ++++++--------------------- src/pages/Dashboard.tsx | 6 ++-- 2 files changed, 13 insertions(+), 40 deletions(-) diff --git a/src/components/PromoOffersSection.tsx b/src/components/PromoOffersSection.tsx index 3ebff75..3c721cf 100644 --- a/src/components/PromoOffersSection.tsx +++ b/src/components/PromoOffersSection.tsx @@ -4,16 +4,6 @@ import { useTranslation } from 'react-i18next'; import { promoApi, PromoOffer } from '../api/promo'; // Icons -const GiftIcon = () => ( - - - -); - const ClockIcon = () => ( ( ); -const SparklesIcon = () => ( - - - -); - const CheckIcon = () => ( ); -const ServerIcon = () => ( - - - -); - // Helper functions const formatTimeLeft = ( expiresAt: string, @@ -81,9 +51,10 @@ const formatTimeLeft = ( return `${minutes}${t('promo.time.minutes')}`; }; -const getOfferIcon = (effectType: string) => { - if (effectType === 'test_access') return ; - return ; +const getOfferIcon = (effectType: string, discountPercent?: number | null) => { + if (effectType === 'test_access') return 🚀; + if (discountPercent) return 🏷️; + return 🎁; }; const getOfferTitle = ( @@ -235,8 +206,8 @@ export default function PromoOffersSection({ className = '' }: PromoOffersSectio className="card border-orange-500/30 bg-gradient-to-br from-orange-500/5 to-transparent transition-colors hover:border-orange-500/50" >
-
- {getOfferIcon(offer.effect_type)} +
+ {getOfferIcon(offer.effect_type, offer.discount_percent)}
@@ -258,8 +229,10 @@ export default function PromoOffersSection({ className = '' }: PromoOffersSectio