'use client'; import { motion, useReducedMotion, AnimatePresence } from 'framer-motion'; import { useEffect, useState } from 'react'; import { UserPlus, Link as LinkIcon, Settings, Trophy, Car, Users, Shield, CheckCircle2 } from 'lucide-react'; interface WorkflowStep { id: number; icon: typeof UserPlus; title: string; description: string; color: string; } const WORKFLOW_STEPS: WorkflowStep[] = [ { id: 1, icon: UserPlus, title: 'Create Account', description: 'Sign up with email or connect iRacing', color: 'text-primary-blue', }, { id: 2, icon: LinkIcon, title: 'Link iRacing', description: 'Connect your iRacing profile for stats', color: 'text-purple-400', }, { id: 3, icon: Settings, title: 'Configure Profile', description: 'Set up your racing preferences', color: 'text-warning-amber', }, { id: 4, icon: Trophy, title: 'Join Leagues', description: 'Find and join competitive leagues', color: 'text-performance-green', }, { id: 5, icon: Car, title: 'Start Racing', description: 'Compete and track your progress', color: 'text-primary-blue', }, ]; export default function AuthWorkflowMockup() { const shouldReduceMotion = useReducedMotion(); const [isMounted, setIsMounted] = useState(false); const [activeStep, setActiveStep] = useState(0); useEffect(() => { setIsMounted(true); }, []); useEffect(() => { if (!isMounted) return; const interval = setInterval(() => { setActiveStep((prev) => (prev + 1) % WORKFLOW_STEPS.length); }, 3000); return () => clearInterval(interval); }, [isMounted]); if (!isMounted) { return (
Step {activeStep + 1}: {WORKFLOW_STEPS[activeStep]?.title || ''}
{WORKFLOW_STEPS[activeStep]?.description || ''}