'use client'; import { useState, useEffect } from 'react'; import { Cigarette, Leaf, Heart, Trophy, DollarSign, TrendingDown, CheckCircle } from 'lucide-react'; const DEMO_SCREENS = [ { id: 'logging', title: 'Log Your Usage', subtitle: 'Track daily consumption with ease', content: (
Nicotine
3
Marijuana
0
Down 40% from last week
), }, { id: 'health', title: 'Health Recovery', subtitle: 'Watch your body heal', content: (
Blood Pressure Normalizes
Oxygen Levels Rise
Circulation Improves 1 week to go
Heart Attack Risk Drops 2 weeks to go
), }, { id: 'achievements', title: 'Achievements', subtitle: 'Celebrate every milestone', content: (
{[ { name: 'First Step', unlocked: true }, { name: 'Hat Trick', unlocked: true }, { name: 'Week Warrior', unlocked: true }, { name: 'Fighter', unlocked: false }, { name: 'Monthly Master', unlocked: false }, { name: 'Goal Crusher', unlocked: false }, ].map((badge) => (
{badge.name}
))}
), }, { id: 'savings', title: 'Money Saved', subtitle: 'Track your financial wins', content: (
$127.50
saved this month
$4.25
per day
$1,530
per year
), }, ]; export function DemoSection() { const [activeScreen, setActiveScreen] = useState(0); const [isPaused, setIsPaused] = useState(false); useEffect(() => { if (isPaused) return; const interval = setInterval(() => { setActiveScreen((prev) => (prev + 1) % DEMO_SCREENS.length); }, 4000); return () => clearInterval(interval); }, [isPaused]); return (
{/* Background accents */}
{/* Section Header */}

See It In{' '} Action

A quick look at how QuitTraq helps you track progress and stay motivated.

{/* Phone Mockup */}
setIsPaused(true)} onMouseLeave={() => setIsPaused(false)} onTouchStart={() => setIsPaused(true)} onTouchEnd={() => setIsPaused(false)} > {/* Phone frame glow */}
{/* Phone frame */}
{/* Notch */}
{/* Screen content */}
{/* Screen header */}

{DEMO_SCREENS[activeScreen].title}

{DEMO_SCREENS[activeScreen].subtitle}

{/* Screen content with transition */}
{DEMO_SCREENS[activeScreen].content}
{/* Bottom gradient overlay */}
{/* Description and indicators */}
{/* Screen descriptions */} {DEMO_SCREENS.map((screen, index) => ( ))}
{/* Dot indicators (mobile) */}
{DEMO_SCREENS.map((_, index) => (
); }