- Updated LiveEventsList to use live data from the live store and improved event rendering with links to event details. - Enhanced MatchDetailView to accept API sections for dynamic market rendering and improved state management for expanded sections. - Modified SportsNav to utilize search parameters for active sport highlighting. - Refactored TopMatches to fetch live match data and odds from the API, replacing static fallback data. - Improved UI elements for better responsiveness and user experience across components.
28 lines
726 B
TypeScript
28 lines
726 B
TypeScript
"use client"
|
|
|
|
import { useSearchParams } from "next/navigation"
|
|
import { HeroBanner } from "./hero-banner"
|
|
import { TopMatches } from "./top-matches"
|
|
import { SportsNav } from "./sports-nav"
|
|
import { HomeTabs } from "./home-tabs"
|
|
import { EventsList } from "./events-list"
|
|
|
|
export function SportHome() {
|
|
const searchParams = useSearchParams()
|
|
const isLeagueView = !!searchParams.get("league")
|
|
|
|
return (
|
|
<div className="flex flex-col gap-3">
|
|
{!isLeagueView && (
|
|
<>
|
|
<HeroBanner />
|
|
<TopMatches />
|
|
<SportsNav />
|
|
<HomeTabs />
|
|
</>
|
|
)}
|
|
<EventsList key={`${searchParams.get("sport") ?? "all"}-${searchParams.get("league") ?? ""}`} />
|
|
</div>
|
|
)
|
|
}
|