From b67d4cac896988c7b8de12109e3bbcdbedc0d557 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 6 May 2026 15:54:08 +0000 Subject: [PATCH] feat(card-onboard): split mobile and desktop into separate components Mobile renders a hero card image with title, description, fees link, and a full-width Get-your-card button under NavbarMobile. Desktop keeps the green-gradient summary card layout. CardWaitlistPage now picks the variant based on isScreenMedium. --- components/CardWaitlist/CardWaitlistPage.tsx | 58 +------------------ .../CardWaitlist/CardWaitlistPageDesktop.tsx | 51 ++++++++++++++++ .../CardWaitlist/CardWaitlistPageMobile.tsx | 55 ++++++++++++++++++ 3 files changed, 109 insertions(+), 55 deletions(-) create mode 100644 components/CardWaitlist/CardWaitlistPageDesktop.tsx create mode 100644 components/CardWaitlist/CardWaitlistPageMobile.tsx diff --git a/components/CardWaitlist/CardWaitlistPage.tsx b/components/CardWaitlist/CardWaitlistPage.tsx index 872e1fcf..a2aa353b 100644 --- a/components/CardWaitlist/CardWaitlistPage.tsx +++ b/components/CardWaitlist/CardWaitlistPage.tsx @@ -1,63 +1,11 @@ -import React, { useState } from 'react'; -import { Pressable, View } from 'react-native'; -import { Image } from 'expo-image'; -import { ChevronRight } from 'lucide-react-native'; - -import AuthButton from '@/components/AuthButton'; -import CardFeesModal from '@/components/CardWaitlist/CardFeesModal'; -import CardWaitlistContainer from '@/components/CardWaitlist/CardWaitlistContainer'; -import CardWaitlistHeader from '@/components/CardWaitlist/CardWaitlistHeader'; -import CardWaitlistHeaderButtons from '@/components/CardWaitlist/CardWaitlistHeaderButtons'; -import CardWaitlistHeaderTitle from '@/components/CardWaitlist/CardWaitlistHeaderTitle'; -import GetCardButton from '@/components/CardWaitlist/GetCardButton'; -import SolidCardSummary from '@/components/CardWaitlist/SolidCardSummary'; -import { Text } from '@/components/ui/text'; +import CardWaitlistPageDesktop from '@/components/CardWaitlist/CardWaitlistPageDesktop'; +import CardWaitlistPageMobile from '@/components/CardWaitlist/CardWaitlistPageMobile'; import { useDimension } from '@/hooks/useDimension'; -import { getAsset } from '@/lib/assets'; const CardWaitlistPage = () => { const { isScreenMedium } = useDimension(); - const [feesOpen, setFeesOpen] = useState(false); - - return ( - - - {isScreenMedium && } - - } - > - - - - - {!isScreenMedium && ( - - )} - - - - - - setFeesOpen(true)} - className="flex-row items-center gap-1 web:hover:opacity-70" - > - Fees and charges - - - - - - - - ); + return isScreenMedium ? : ; }; export default CardWaitlistPage; diff --git a/components/CardWaitlist/CardWaitlistPageDesktop.tsx b/components/CardWaitlist/CardWaitlistPageDesktop.tsx new file mode 100644 index 00000000..5baac124 --- /dev/null +++ b/components/CardWaitlist/CardWaitlistPageDesktop.tsx @@ -0,0 +1,51 @@ +import { useState } from 'react'; +import { Pressable, View } from 'react-native'; +import { ChevronRight } from 'lucide-react-native'; + +import AuthButton from '@/components/AuthButton'; +import CardFeesModal from '@/components/CardWaitlist/CardFeesModal'; +import CardWaitlistContainer from '@/components/CardWaitlist/CardWaitlistContainer'; +import CardWaitlistHeader from '@/components/CardWaitlist/CardWaitlistHeader'; +import CardWaitlistHeaderButtons from '@/components/CardWaitlist/CardWaitlistHeaderButtons'; +import CardWaitlistHeaderTitle from '@/components/CardWaitlist/CardWaitlistHeaderTitle'; +import GetCardButton from '@/components/CardWaitlist/GetCardButton'; +import SolidCardSummary from '@/components/CardWaitlist/SolidCardSummary'; +import { Text } from '@/components/ui/text'; + +const CardWaitlistPageDesktop = () => { + const [feesOpen, setFeesOpen] = useState(false); + + return ( + + + + + } + > + + + + + + + + + setFeesOpen(true)} + className="flex-row items-center gap-1 web:hover:opacity-70" + > + Fees and charges + + + + + + + + + ); +}; + +export default CardWaitlistPageDesktop; diff --git a/components/CardWaitlist/CardWaitlistPageMobile.tsx b/components/CardWaitlist/CardWaitlistPageMobile.tsx new file mode 100644 index 00000000..976129d0 --- /dev/null +++ b/components/CardWaitlist/CardWaitlistPageMobile.tsx @@ -0,0 +1,55 @@ +import { useState } from 'react'; +import { Pressable, View } from 'react-native'; +import { Image } from 'expo-image'; +import { ChevronRight } from 'lucide-react-native'; + +import AuthButton from '@/components/AuthButton'; +import CardFeesModal from '@/components/CardWaitlist/CardFeesModal'; +import GetCardButton from '@/components/CardWaitlist/GetCardButton'; +import PageLayout from '@/components/PageLayout'; +import { Text } from '@/components/ui/text'; +import { getAsset } from '@/lib/assets'; + +const CardWaitlistPageMobile = () => { + const [feesOpen, setFeesOpen] = useState(false); + + return ( + } + > + + + + + + + Free Visa Card + + 3% cashback on all purchases. No monthly charge or hidden fees + + + + + setFeesOpen(true)} + className="flex-row items-center gap-1 web:hover:opacity-70" + > + Fees and charges + + + + + + + + + + ); +}; + +export default CardWaitlistPageMobile;