'use client' import { useEffect, useState } from 'react' import { useRouter, useSearchParams } from 'next/navigation' import { TerminalLayout } from '@/components/TerminalLayout' import { PageContainer } from '@/components/PremiumTable' import { useStore } from '@/lib/store' import { CheckCircle, Zap, Crown, ArrowRight, Eye, Store, Bell, BarChart3, Sparkles, TrendingUp, } from 'lucide-react' import Link from 'next/link' import clsx from 'clsx' const planDetails = { trader: { name: 'Trader', icon: TrendingUp, color: 'text-accent', bgColor: 'bg-accent/10', features: [ { icon: Eye, text: '50 domains in watchlist', description: 'Track up to 50 domains at once' }, { icon: Zap, text: 'Hourly availability checks', description: '24x faster than Scout' }, { icon: Store, text: '10 For Sale listings', description: 'List your domains on the marketplace' }, { icon: Bell, text: '5 Sniper Alerts', description: 'Get notified when specific domains drop' }, { icon: BarChart3, text: 'Deal scores & valuations', description: 'Know what domains are worth' }, ], nextSteps: [ { href: '/terminal/watchlist', label: 'Add domains to watchlist', icon: Eye }, { href: '/terminal/market', label: 'Browse the market', icon: Store }, { href: '/terminal/intel', label: 'Check TLD pricing', icon: BarChart3 }, ], }, tycoon: { name: 'Tycoon', icon: Crown, color: 'text-amber-400', bgColor: 'bg-amber-400/10', features: [ { icon: Eye, text: '500 domains in watchlist', description: 'Massive tracking capacity' }, { icon: Zap, text: 'Real-time checks (10 min)', description: 'Never miss a drop' }, { icon: Store, text: '50 For Sale listings', description: 'Full marketplace access' }, { icon: Bell, text: 'Unlimited Sniper Alerts', description: 'Set as many as you need' }, { icon: Sparkles, text: 'SEO Juice Detector', description: 'Find domains with backlinks' }, ], nextSteps: [ { href: '/terminal/watchlist', label: 'Add domains to watchlist', icon: Eye }, { href: '/terminal/market', label: 'Browse the market', icon: Store }, { href: '/terminal/listing', label: 'List your domains', icon: Sparkles }, ], }, } export default function WelcomePage() { const router = useRouter() const searchParams = useSearchParams() const { fetchSubscription, checkAuth } = useStore() const [loading, setLoading] = useState(true) const [showConfetti, setShowConfetti] = useState(true) const planId = searchParams.get('plan') as 'trader' | 'tycoon' | null const plan = planId && planDetails[planId] ? planDetails[planId] : planDetails.trader useEffect(() => { const init = async () => { await checkAuth() await fetchSubscription() setLoading(false) } init() // Hide confetti after animation const timer = setTimeout(() => setShowConfetti(false), 3000) return () => clearTimeout(timer) }, [checkAuth, fetchSubscription]) if (loading) { return (
) } return ( {/* Confetti Effect */} {showConfetti && (
{Array.from({ length: 50 }).map((_, i) => (
))}
)} {/* Success Header */}

Welcome to {plan.name}!

Your payment was successful. You now have access to all {plan.name} features.

{/* Features Unlocked */}

Features Unlocked

{plan.features.map((feature, i) => (

{feature.text}

{feature.description}

))}
{/* Next Steps */}

Next Steps

{plan.nextSteps.map((step, i) => (
{step.label}
))}
{/* Go to Dashboard */}
Go to Radar

Need help? Contact support.

{/* Custom CSS for confetti animation */} ) }