"use client"; import { useEffect, useState } from "react"; import { motion } from "framer-motion"; import { fontCursive } from "@/config/fonts"; const fadeInUp = { initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.8 }, }; const LiveVideos = () => { const [weddingStatus, setWeddingStatus] = useState({ show: false, isLive: false, }); const [receptionStatus, setReceptionStatus] = useState({ show: false, isLive: false, }); useEffect(() => { const today = new Date(); // Normalize today to start of day for accurate comparison const startOfToday = new Date( today.getFullYear(), today.getMonth(), today.getDate(), ); // Dates from CountdownTimer: Wedding Jan 23, Reception Jan 25 (2026) const weddingDate = new Date(2026, 0, 23); const receptionDate = new Date(2026, 0, 25); setWeddingStatus({ show: startOfToday >= weddingDate, isLive: startOfToday.getTime() === weddingDate.getTime(), }); setReceptionStatus({ show: startOfToday >= receptionDate, isLive: startOfToday.getTime() === receptionDate.getTime(), }); }, []); const VideoFallback = ({ title, date }: { title: string; date: string }) => (
{/* Background with subtle animation */}
{/* Animated glowing rings */}

{title} Stream

Our hearts are filled with joy as we prepare for our big day.

Available on {date}

Reserved for Guests
); return (

Live Feed

Witness our special moments from wherever you are

{/* Wedding Video Section */}
{weddingStatus.isLive && ( Live Now )}

The Wedding

{weddingStatus.show ? (