import React, { useState, useEffect } from "react"; import { motion, AnimatePresence } from "framer-motion"; import { Play, Pause, ArrowRight, ArrowLeft, X } from "lucide-react"; export default function EsportsLanding() { const slides = [ { id: 1, title: "Rise of Champions", subtitle: "Experience the thrill of competitive esports", image: "/assets/slide1.jpg" }, { id: 2, title: "Unleash Your Power", subtitle: "Train with the best, play like a pro", image: "/assets/slide2.jpg" }, { id: 3, title: "Glory Awaits", subtitle: "Join our tournaments and claim victory", image: "/assets/slide3.jpg" }, ]; const replays = [ { id: 1, title: "Grand Finals - Game 5", thumb: "/assets/replay1.jpg", video: "/assets/replay1.mp4", duration: "32:11" }, { id: 2, title: "Semi-Final Highlights", thumb: "/assets/replay2.jpg", video: "/assets/replay2.mp4", duration: "19:45" }, { id: 3, title: "Epic 1v5 Clutch", thumb: "/assets/replay3.jpg", video: "/assets/replay3.mp4", duration: "05:32" }, ]; const [index, setIndex] = useState(0); const [isPlaying, setIsPlaying] = useState(true); const [selectedReplay, setSelectedReplay] = useState(null); // Auto slide useEffect(() => { if (!isPlaying) return; const timer = setInterval(() => { setIndex((prev) => (prev + 1) % slides.length); }, 4000); return () => clearInterval(timer); }, [isPlaying, slides.length]); return (
{/* NAVBAR */}
ISTANA ESPORTS
{/* HERO SLIDER */}
{slides[index].title}

{slides[index].title}

{slides[index].subtitle}

{/* Controls */}
{/* MATCH REPLAYS */}

Match Replays

Watch the best moments

{replays.map((rp) => (
setSelectedReplay(rp)} > {rp.title}

{rp.title}

{rp.duration}

))}
{/* VIDEO MODAL */} {selectedReplay && (

{selectedReplay.title}

)}
{/* FOOTER */}
); }