mirror of
https://github.com/ershisan99/www.git
synced 2025-12-18 12:34:17 +00:00
fix timezones for next match card and add last match vods
This commit is contained in:
@@ -2,7 +2,7 @@ import { NextMatchInfoCard } from '@/app/(home)/major-league-balatro/_components
|
||||
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 { useFormatter, useTimeZone } from 'next-intl'
|
||||
import type { PropsWithChildren } from 'react'
|
||||
import { players } from '../_constants/players'
|
||||
import type { Match } from '../types'
|
||||
@@ -12,6 +12,7 @@ export type NextMatchInfoProps = {
|
||||
}
|
||||
|
||||
export function NextMatchInfo({ nextMatch }: NextMatchInfoProps) {
|
||||
const timeZone = useTimeZone()
|
||||
const formatter = useFormatter()
|
||||
if (!nextMatch) {
|
||||
return (
|
||||
@@ -45,9 +46,11 @@ export function NextMatchInfo({ nextMatch }: NextMatchInfoProps) {
|
||||
month: 'long',
|
||||
day: 'numeric',
|
||||
year: 'numeric',
|
||||
timeZone,
|
||||
})
|
||||
const time = formatter.dateTime(nextMatch.datetime, {
|
||||
timeStyle: 'short',
|
||||
timeZone,
|
||||
})
|
||||
|
||||
if (!nextMatchPlayer1) {
|
||||
|
||||
@@ -221,7 +221,9 @@ export const matches: Match[] = [
|
||||
player1Id: 'haelian',
|
||||
player2Id: 'bear',
|
||||
datetime: new Date('2025-04-28T17:00:00-04:00'),
|
||||
completed: false,
|
||||
completed: true,
|
||||
vod1: 'https://www.twitch.tv/videos/2445030299?t=4h1m48s',
|
||||
vod2: 'https://www.twitch.tv/videos/2445202859?t=0h9m7s',
|
||||
week: 4,
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Standings } from '@/app/(home)/major-league-balatro/_components/standings'
|
||||
import { TimeZoneProvider } from '@/components/timezone-provider'
|
||||
import Link from 'next/link'
|
||||
import { Competitors } from './_components/competitors'
|
||||
import { HeroSection } from './_components/hero'
|
||||
@@ -25,9 +25,9 @@ export default function MLBPage() {
|
||||
<div className='flex min-h-screen flex-col'>
|
||||
<main className='flex-1'>
|
||||
<HeroSection />
|
||||
|
||||
<TimeZoneProvider>
|
||||
<NextMatchInfo nextMatch={nextMatch} />
|
||||
|
||||
</TimeZoneProvider>
|
||||
{/*<Standings />*/}
|
||||
|
||||
<TournamentFormat />
|
||||
|
||||
Reference in New Issue
Block a user