import { NextMatchInfoCard } from '@/app/(home)/major-league-balatro/_components/next-match-info-card' import { CountdownTimer } from '@/components/countdown-timer' import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card' import { Calendar, Clock } from 'lucide-react' import { useFormatter } from 'next-intl' import type { PropsWithChildren } from 'react' import { players } from '../_constants/players' import type { Match } from '../types' export type NextMatchInfoProps = { nextMatch: Match | undefined } export function NextMatchInfo({ nextMatch }: NextMatchInfoProps) { const formatter = useFormatter() if (!nextMatch) { return ( Tournament Schedule No upcoming matches scheduled at this time. Check back later for updates or view past matches below. ) } const nextMatchPlayer1 = players[nextMatch.player1Id] const nextMatchPlayer2 = players[nextMatch.player2Id] const date = formatter.dateTime(nextMatch.datetime, { month: 'long', day: 'numeric', year: 'numeric', }) const time = formatter.dateTime(nextMatch.datetime, { timeStyle: 'short', }) if (!nextMatchPlayer1) { throw new Error(`Player ${nextMatch.player1Id} not found`) } if (!nextMatchPlayer2) { throw new Error(`Player ${nextMatch.player2Id} not found`) } return ( Next Match Countdown {date} • {time} ) } function SectionContainer({ children }: PropsWithChildren) { return ( {children} ) }
No upcoming matches scheduled at this time.
Check back later for updates or view past matches below.
{date} • {time}