mirror of
https://github.com/ershisan99/www.git
synced 2025-12-17 12:34:17 +00:00
fix timezones?
This commit is contained in:
@@ -27,7 +27,7 @@ import {
|
||||
MinusCircle,
|
||||
} from 'lucide-react'
|
||||
import { useSession } from 'next-auth/react'
|
||||
import { useFormatter } from 'next-intl'
|
||||
import { useFormatter, useTimeZone } from 'next-intl'
|
||||
import Link from 'next/link'
|
||||
import { useMemo, useState } from 'react'
|
||||
|
||||
@@ -60,6 +60,7 @@ function openTranscript(gameNumber: number): void {
|
||||
}
|
||||
const useColumns = () => {
|
||||
const format = useFormatter()
|
||||
const timeZone = useTimeZone()
|
||||
const session = useSession()
|
||||
const isAdmin = session.data?.user.role === 'admin'
|
||||
return useMemo(
|
||||
@@ -154,6 +155,7 @@ const useColumns = () => {
|
||||
year: 'numeric',
|
||||
month: '2-digit',
|
||||
day: '2-digit',
|
||||
timeZone,
|
||||
})}
|
||||
</span>
|
||||
),
|
||||
@@ -170,6 +172,7 @@ const useColumns = () => {
|
||||
{format.dateTime(info.getValue(), {
|
||||
hour: '2-digit',
|
||||
minute: '2-digit',
|
||||
timeZone,
|
||||
})}
|
||||
</span>
|
||||
),
|
||||
|
||||
@@ -16,6 +16,7 @@ import type React from 'react'
|
||||
import { useState } from 'react'
|
||||
|
||||
import { GamesTable } from '@/app/(home)/players/[id]/_components/games-table'
|
||||
import { TimeZoneProvider } from '@/components/timezone-provider'
|
||||
import { MmrTrendChart } from '@/app/(home)/players/[id]/_components/mmr-trend-chart'
|
||||
import { WinrateTrendChart } from '@/app/(home)/players/[id]/_components/winrate-trend-chart'
|
||||
import { OpponentsTable } from '@/app/(home)/players/[id]/_components/opponents-table'
|
||||
@@ -427,7 +428,9 @@ export function UserInfo() {
|
||||
<TabsContent value='matches' className='m-0'>
|
||||
<div className='overflow-hidden rounded-lg border'>
|
||||
<div className='overflow-x-auto'>
|
||||
<GamesTable games={filteredGames} />
|
||||
<TimeZoneProvider>
|
||||
<GamesTable games={filteredGames} />
|
||||
</TimeZoneProvider>
|
||||
</div>
|
||||
</div>
|
||||
</TabsContent>
|
||||
|
||||
Reference in New Issue
Block a user