import { useState, useCallback } from 'react'; import Scene from '../components/3d/Scene'; import confetti from 'canvas-confetti'; export default function Inauguration() { const [isCelebrating, setIsCelebrating] = useState(false); const [showWelcome, setShowWelcome] = useState(false); const [isHovered, setIsHovered] = useState(false); const triggerConfetti = useCallback(() => { const duration = 5 * 1000; const animationEnd = Date.now() + duration; const defaults = { startVelocity: 30, spread: 360, ticks: 60, zIndex: 0 }; const randomInRange = (min: number, max: number) => Math.random() * (max - min) + min; const interval: any = setInterval(function() { const timeLeft = animationEnd - Date.now(); if (timeLeft <= 0) { return clearInterval(interval); } const particleCount = 50 * (timeLeft / duration); const colors = ['#2E90FA', '#53B1FD', '#84CAFF', '#1570EF', '#175CD3']; confetti({ ...defaults, particleCount, origin: { x: randomInRange(0.1, 0.3), y: Math.random() - 0.2 }, colors: colors, shapes: ['circle', 'square'], scalar: randomInRange(0.8, 1.5) }); confetti({ ...defaults, particleCount, origin: { x: randomInRange(0.7, 0.9), y: Math.random() - 0.2 }, colors: colors, shapes: ['circle', 'square'], scalar: randomInRange(0.8, 1.5) }); }, 250); }, []); const handleKickstart = () => { setIsCelebrating(true); triggerConfetti(); setTimeout(() => { setShowWelcome(true); }, 2000); }; return (
{/* Animated Gradient Background */}
{/* Animated Mesh Gradient Overlay */}
{/* Floating Bubbles */}
{[...Array(20)].map((_, i) => (
))}
{/* 3D Scene */}
{/* Main Content Container */}
{/* Logo Section */}
{/* Logo Container with Glassmorphism */}
{/* Glow Effect Behind Logo */}
{/* Logo Text */}

FRESHYO

{/* Tagline */}

Freshness Delivered

{/* Center Content - CTA or Welcome Message */}
{!showWelcome ? ( /* CTA Button */
setIsHovered(true)} onMouseLeave={() => setIsHovered(false)} > {/* Subtext under button */}

Click to celebrate our launch in Mahabubnagar

) : ( /* Welcome Message */
{/* Background glow */}
{/* Success Icon */}

Welcome to Freshyo!

We're now live in Mahabubnagar
{/* Decorative line */}
)}
{/* Footer Info */}

Bringing fresh groceries to your doorstep

{/* Side Decorative Elements */}
{[...Array(3)].map((_, i) => (
))}
{[...Array(3)].map((_, i) => (
))}
{/* Custom Styles */}
); }