'use client' import * as React from 'react' interface SplashScreenProps { onComplete: () => void minDuration?: number } export function SplashScreen({ onComplete, minDuration = 1500 }: SplashScreenProps) { const [visible, setVisible] = React.useState(true) const [logoScale, setLogoScale] = React.useState(0.8) const [textOpacity, setTextOpacity] = React.useState(0) const onCompleteRef = React.useRef(onComplete) onCompleteRef.current = onComplete React.useEffect(() => { let mounted = true // Animation sequence const timer = setTimeout(() => { if (!mounted) return setLogoScale(1) setTextOpacity(1) setTimeout(() => { if (!mounted) return setVisible(false) onCompleteRef.current() }, 800) }, minDuration) return () => { mounted = false clearTimeout(timer) } }, [minDuration]) if (!visible) return null return (
Your Personal Offline Learning Center