'use client'; import React, { useEffect, useState } from 'react'; import Header from '../../components/custom/header'; import Footer from '../../components/custom/footer'; // Define the Event interface including new fields interface Event { EventID: number; name: string; date: string; location: string; ticketPrice: string; description: string; capacity: number; ticketsSold: number; imageUrl: string; } // Dummy function to fetch events const fetchEvents = (): Event[] => { return [ { EventID: 1, name: 'Rock Concert', date: '2023-12-01', location: 'New York City', ticketPrice: '$99', description: 'An exhilarating rock concert featuring famous bands.', capacity: 5000, ticketsSold: 4500, imageUrl: 'https://via.placeholder.com/150', }, { EventID: 2, name: 'Art Expo', date: '2023-11-15', location: 'San Francisco', ticketPrice: '$55', description: 'A showcase of modern art from around the world.', capacity: 300, ticketsSold: 260, imageUrl: 'https://via.placeholder.com/150', }, { EventID: 3, name: 'Tech Summit 2023', date: '2023-12-10', location: 'Chicago', ticketPrice: '$250', description: 'The leading tech summit with top industry speakers.', capacity: 2000, ticketsSold: 1800, imageUrl: 'https://via.placeholder.com/150', }, ]; }; const TicketListing: React.FC = () => { const [events, setEvents] = useState([]); const [hoveredEventId, setHoveredEventId] = useState(null); useEffect(() => { const eventsData = fetchEvents(); setEvents(eventsData); }, []); return (
{/* Video Background */} {/* Overlay for Readability */}
{/* Main Content */}

Available Events

{events.map((event) => (
setHoveredEventId(event.EventID)} onMouseLeave={() => setHoveredEventId(null)} > {event.name}

{event.name}

{event.date}

{event.location}

{event.ticketPrice}

{event.ticketsSold / event.capacity >= 0.9 && (
Limited Tickets Remaining!
)}
{hoveredEventId === event.EventID && (

{event.description}

)}
))}
); }; export default TicketListing;