'use client'; import { useEffect, useState } from 'react'; import { motion } from 'framer-motion'; export function SplashScreen({ onComplete }: { onComplete: () => void }) { const [isVisible, setIsVisible] = useState(true); useEffect(() => { const timer = setTimeout(() => { setIsVisible(false); setTimeout(onComplete, 500); // Wait for exit animation }, 2500); // Show for 2.5 seconds return () => clearTimeout(timer); }, [onComplete]); if (!isVisible) return null; return (
{/* Logo Animation */}
{/* Title Animation */} Todo App {/* Subtitle Animation */} Organize your life, achieve your goals {/* Loading Dots */} {[0, 1, 2].map((i) => ( ))}
); }