From d0f750e7c7ac4cfa15ae919fd29ab846edd881c9 Mon Sep 17 00:00:00 2001 From: sweshelo Date: Sun, 23 Feb 2025 21:02:46 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20=E6=99=82=E5=B7=AE?= =?UTF-8?q?=E3=81=8C=E7=99=BA=E7=94=9F=E3=81=99=E3=82=8B=E3=81=AE=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/features/online/index.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/features/online/index.tsx b/src/features/online/index.tsx index 190ce95..54d12aa 100644 --- a/src/features/online/index.tsx +++ b/src/features/online/index.tsx @@ -1,7 +1,9 @@ +import { TZDate } from '@date-fns/tz' import { differenceInMinutes } from 'date-fns' import { Headline } from '@/components/common/headline' import { PlayerCard } from '@/components/player/card' +import { Revalidater } from '@/components/revalidater' interface Props { players: { @@ -15,15 +17,15 @@ export const OnlinePlayers = ({ players }: Props) => { return ( <> +
{players.map((player, index) => (
- {player.recorded_at - ? `${differenceInMinutes(new Date(), new Date(player.recorded_at))}分前` - : '時刻不明' - } + {player.recorded_at + ? `${differenceInMinutes(new Date(), new TZDate(player.recorded_at, 'Asia/Tokyo'))}分前` + : '時刻不明'}