'use client' import { useEffect, useState } from 'react' import { motion } from 'framer-motion' import Image from 'next/image' interface PageLoaderProps { onLoadingComplete: () => void duration?: number } export default function PageLoader({ onLoadingComplete, duration = 800 }: PageLoaderProps) { const [progress, setProgress] = useState(0) useEffect(() => { // Progress bar animation - faster completion const progressInterval = setInterval(() => { setProgress(prev => { if (prev >= 100) { clearInterval(progressInterval) return 100 } return prev + 12.5 // Will complete in 0.8 seconds (100/12.5 * 100ms) }) }, 100) // Complete loading after duration const loadingTimeout = setTimeout(() => { onLoadingComplete() }, duration) return () => { clearInterval(progressInterval) clearTimeout(loadingTimeout) } }, [duration, onLoadingComplete]) return (
{/* Kashmina Logo */}
Kashmina Logo
{/* Welcome Heading */}

Welcome to Padmaaja Rasooi

Premium Rice • Authentic Quality • From Farm to Kitchen

{/* Progress Bar */}

Loading your premium rice experience...

) }