import { useSearchParams } from 'react-router-dom'; import { Header } from '../components/Header'; import { FeaturedSection } from '../components/FeaturedSection'; import { useBackgroundImage } from '../hooks/useBackgroundImage'; import { Category } from '../types'; export function HomePage() { const [searchParams] = useSearchParams(); const category = searchParams.get('category') as Category | null; const backgroundImage = useBackgroundImage(category); const getHeroTitle = () => { if (category) { return { main: `Discover ${category}`, sub: getCategoryDescription(category) }; } return { main: 'Discover the World of', sub: 'Arts & Culture' }; }; const getCategoryDescription = (category: Category): string => { const descriptions = { Film: 'Cinema & Motion Pictures', Theater: 'Stage & Performance', Music: 'Rhythm & Harmony', Sports: 'Athletics & Competition', Art: 'Visual & Creative Expression', Legends: 'Stories & Heritage', Anniversaries: 'Celebrations & Milestones', Memory: 'History & Remembrance' }; return descriptions[category]; }; const { main, sub } = getHeroTitle(); return ( <>

{main} {sub}

{category ? `Explore the latest ${category.toLowerCase()} stories, events, and cultural highlights from around the globe.` : 'Explore the latest in art, music, theater, and cultural events from around the globe. Join us on a journey through the world\'s most inspiring creative expressions.' }

); }