diff --git a/src/app/(home)/major-league-balatro/_components/next-match-info-card.tsx b/src/app/(home)/major-league-balatro/_components/next-match-info-card.tsx index c40344a..eb8779b 100644 --- a/src/app/(home)/major-league-balatro/_components/next-match-info-card.tsx +++ b/src/app/(home)/major-league-balatro/_components/next-match-info-card.tsx @@ -1,3 +1,4 @@ +import { TimeZoneProvider } from '@/components/timezone-provider' import { Button } from '@/components/ui/button' import { DropdownMenu, @@ -24,67 +25,69 @@ export function NextMatchInfoCard({ bestOf, }: NextMatchInfoCardProps) { return ( -
-
-
-
- {typeof week === 'string' ? week : `Week ${week}`} + +
+
+
+
+ {typeof week === 'string' ? week : `Week ${week}`} +
+
+ Best of {bestOf} +
-
- Best of {bestOf} -
-
-
-

-
- - {player1.name} -
- vs -
- {player2.name} - -
-

-
- - - - - - - +
+

+
+ {player1.name} - - - - +
+ vs +
{player2.name} - - - - + +
+

+
+ + + + + + + + {player1.name} + + + + + {player2.name} + + + + +
-
+ ) } diff --git a/src/components/timezone-provider.tsx b/src/components/timezone-provider.tsx new file mode 100644 index 0000000..0fcc3de --- /dev/null +++ b/src/components/timezone-provider.tsx @@ -0,0 +1,18 @@ +'use client' + +import { NextIntlClientProvider, useLocale } from 'next-intl' +import { useEffect, useState } from 'react' + +export function TimeZoneProvider({ children }: { children: React.ReactNode }) { + const [timeZone, setTimeZone] = useState() + const locale = useLocale() + useEffect(() => { + setTimeZone(Intl.DateTimeFormat().resolvedOptions().timeZone) + }, []) + + return ( + + {children} + + ) +}