only hide next match when no info, not the entire page

This commit is contained in:
2025-05-10 03:52:53 +02:00
parent 69f3c2bc4b
commit 19cea47b90

View File

@@ -17,17 +17,16 @@ export default function MLBPage() {
const nextMatch = matches const nextMatch = matches
.filter((match) => !match.completed && match.datetime > currentDate) .filter((match) => !match.completed && match.datetime > currentDate)
.sort((a, b) => a.datetime.getTime() - b.datetime.getTime())[0] .sort((a, b) => a.datetime.getTime() - b.datetime.getTime())[0]
if (!nextMatch) {
return 'All matches have been played'
}
return ( return (
<div className='flex min-h-screen flex-col'> <div className='flex min-h-screen flex-col'>
<main className='flex-1'> <main className='flex-1'>
<HeroSection /> <HeroSection />
<TimeZoneProvider> {nextMatch && (
<NextMatchInfo nextMatch={nextMatch} /> <TimeZoneProvider>
</TimeZoneProvider> <NextMatchInfo nextMatch={nextMatch} />
</TimeZoneProvider>
)}
{/*<Standings />*/} {/*<Standings />*/}
<TournamentFormat /> <TournamentFormat />