Fortune-PlayLogic/components/betting/sport-home.tsx
brooktewabe 8941c45555 Refactor live events list and match detail view components
- 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.
2026-03-02 19:08:52 +03:00

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>
)
}