From 05f98bf4a72ed210065bff03cd7030c6cc478901 Mon Sep 17 00:00:00 2001 From: Liam Date: Sat, 28 Sep 2024 15:07:47 +0100 Subject: [PATCH] format days ago number --- src/components/player/player-tracked-status.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/player/player-tracked-status.tsx b/src/components/player/player-tracked-status.tsx index 12fe157..81bc091 100644 --- a/src/components/player/player-tracked-status.tsx +++ b/src/components/player/player-tracked-status.tsx @@ -9,6 +9,7 @@ import { InformationCircleIcon } from "@heroicons/react/16/solid"; import { format } from "@formkit/tempo"; import { PlayerTrackedSince } from "@/common/player/player-tracked-since"; import { getDaysAgo } from "@/common/time-utils"; +import { formatNumberWithCommas } from "@/common/number-utils"; type Props = { player: ScoreSaberPlayer; @@ -31,7 +32,7 @@ export default function PlayerTrackedStatus({ player }: Props) { const trackedSince = new Date(data.trackedSince!); const daysAgo = getDaysAgo(trackedSince) + 1; - let daysAgoFormatted = `${daysAgo} day${daysAgo > 1 ? "s" : ""} ago`; + let daysAgoFormatted = `${formatNumberWithCommas(daysAgo)} day${daysAgo > 1 ? "s" : ""} ago`; if (daysAgo === 1) { daysAgoFormatted = "Today"; }