mirror of
https://github.com/ershisan99/www.git
synced 2025-12-18 05:19:23 +00:00
only hide next match when no info, not the entire page
This commit is contained in:
@@ -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 />
|
||||||
|
|||||||
Reference in New Issue
Block a user