From e7b2594e2c5ab01b55b3be5949d4eef4f84d5103 Mon Sep 17 00:00:00 2001 From: Liam Date: Sat, 28 Sep 2024 14:59:30 +0100 Subject: [PATCH] fix tracked since --- src/app/(pages)/api/player/history/route.ts | 2 +- src/components/player/player-tracked-status.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/(pages)/api/player/history/route.ts b/src/app/(pages)/api/player/history/route.ts index 194490d..f5ed437 100644 --- a/src/app/(pages)/api/player/history/route.ts +++ b/src/app/(pages)/api/player/history/route.ts @@ -23,7 +23,7 @@ export async function GET(request: NextRequest) { if (shouldCreatePlayer && foundPlayer == null) { foundPlayer = await PlayerModel.create({ _id: id, - trackedSince: new Date(), + trackedSince: new Date().toISOString(), }); const response = await scoresaberService.lookupPlayer(id, true); if (response != undefined) { diff --git a/src/components/player/player-tracked-status.tsx b/src/components/player/player-tracked-status.tsx index 7d611c4..85ecfb8 100644 --- a/src/components/player/player-tracked-status.tsx +++ b/src/components/player/player-tracked-status.tsx @@ -34,7 +34,7 @@ export default function PlayerTrackedStatus({ player }: Props) { display={

This player is having their statistics tracked!

-

Tracked Since: {format(data.trackedSince!)}

+

Tracked Since: {format(new Date(data.trackedSince!))}

} side="bottom"