/* ── ANIMATED DASHBOARD PREVIEW ────────────────────────────────────── */ function AnimatedDashboard({ compact = false }) { const [leads, setLeads] = useState(248); const [winRate, setWinRate] = useState(68); const [newWeek, setNewWeek] = useState(42); const [pulseCol, setPulseCol] = useState(0); // which column gets a new card const [flash, setFlash] = useState(false); // tick counters useEffect(() => { const t = setInterval(() => { setLeads(v => v + Math.floor(Math.random() * 3)); setNewWeek(v => v + (Math.random() > 0.6 ? 1 : 0)); setWinRate(v => Math.max(54, Math.min(78, v + (Math.random() - 0.5) * 1.2))); setPulseCol(c => (c + 1) % 3); setFlash(true); setTimeout(() => setFlash(false), 600); }, 2400); return () => clearInterval(t); }, []); const colors = ["#3b82f6", "#8b5cf6", "#10b981"]; const statBg = [ "linear-gradient(135deg,#3b82f6,#1d4ed8)", "linear-gradient(135deg,#8b5cf6,#6d28d9)", "linear-gradient(135deg,#10b981,#047857)", ]; // Sparkline path animates between two values const sparkPath = "M 10 70 L 60 50 L 110 60 L 160 30 L 210 38 L 260 18 L 320 42 L 350 30"; const sparkArea = "M 10 70 L 60 50 L 110 60 L 160 30 L 210 38 L 260 18 L 320 42 L 350 30 L 350 95 L 10 95 Z"; const dashedPath = "M 10 82 L 60 78 L 110 80 L 160 70 L 210 64 L 260 56 L 320 48 L 350 44"; return (
Good afternoon, Alex 👋
Pipeline overview · last 7 days
Lead inflow · 7d