From 4b8f4315e91fa9edf82972aa56b54db33e7c11de Mon Sep 17 00:00:00 2001 From: Jamie Brunton Date: Wed, 7 Jan 2026 19:57:07 +0000 Subject: [PATCH] Add premium subscription card with gold styling --- .../src/features/profile/ProfileScreen.tsx | 168 ++---------------- .../src/features/profile/components/index.ts | 2 + 2 files changed, 15 insertions(+), 155 deletions(-) diff --git a/apps/mobile/src/features/profile/ProfileScreen.tsx b/apps/mobile/src/features/profile/ProfileScreen.tsx index 1011c38..d2c6bb7 100644 --- a/apps/mobile/src/features/profile/ProfileScreen.tsx +++ b/apps/mobile/src/features/profile/ProfileScreen.tsx @@ -10,13 +10,12 @@ import Animated, { interpolate, Extrapolation } from 'react-native-reanimated'; -import { LinearGradient } from 'expo-linear-gradient'; import { BlurView } from 'expo-blur'; -import { GradientBackground, GlassCard } from '../../components/ui'; +import { GradientBackground } from '../../components/ui'; import { FeedbackModal } from '../../components/feedback'; import { Paywall } from '../../components/paywall'; -import { colors, featureColors, spacing, typography, radius, shadows } from '../../theme'; +import { colors, featureColors, spacing, typography, radius } from '../../theme'; import { useAuthStore, useSubscriptionStore } from '../../store'; import { resetSwipeTutorial } from '../../lib/swipeTutorialSeen'; import { resetMatchesTutorial } from '../../lib/matchesTutorialSeen'; @@ -27,10 +26,9 @@ import { clearKeys } from '../../lib/encryption'; import { useProfileSettings, useCoupleManagement } from './hooks'; // Components -import { AppearanceSettings, CoupleStatus, NotificationSettings, PrivacySettings, DangerZone, SettingsSection, MenuItem } from './components'; +import { AppearanceSettings, CoupleStatus, NotificationSettings, PrivacySettings, DangerZone, SettingsSection, MenuItem, SubscriptionCard } from './components'; const MAX_CONTENT_WIDTH = 500; -const ACCENT_GRADIENT = featureColors.profile.gradient as [string, string]; const NAV_BAR_HEIGHT = 44; const STATUS_BAR_HEIGHT = 60; const HEADER_SCROLL_DISTANCE = 100; @@ -188,77 +186,16 @@ export function ProfileScreen() { /> {/* Subscription Section */} - - {hasPremiumAccess ? ( - - - - - - - Pro Member - - {isOwnSubscription - ? `Renews ${formatExpirationDate(subscription.expirationDate)}` - : "Via partner's subscription" - } - - - - {isOwnSubscription && ( - - Manage - - )} - - ) : ( - settings.setShowPaywall(true)} - activeOpacity={0.7} - > - - - - - - Free Plan - Upgrade to unlock all packs - - - - Upgrade - - - )} - - {/* Restore Purchases Link */} - {!hasPremiumAccess && ( - - - {settings.isPurchasing ? "Restoring..." : "Restore Purchases"} - - - )} - + settings.setShowPaywall(true)} + onManagePress={settings.handleManageSubscription} + onRestorePress={settings.handleRestorePurchases} + isRestoring={settings.isPurchasing} + delay={350} + /> {/* Notifications */}