From 2ce413ad3fbdd2b5b78447a99cb9b6d6117781d3 Mon Sep 17 00:00:00 2001 From: Liam Date: Fri, 27 Oct 2023 16:39:13 +0100 Subject: [PATCH] format online player count in embed --- src/app/analytics/page.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/analytics/page.tsx b/src/app/analytics/page.tsx index cc9a249..cd17623 100644 --- a/src/app/analytics/page.tsx +++ b/src/app/analytics/page.tsx @@ -3,6 +3,7 @@ import Card from "@/components/Card"; import Container from "@/components/Container"; import { ScoresaberPlayerCountHistory } from "@/schemas/fascinated/scoresaberPlayerCountHistory"; import { ssrSettings } from "@/ssrSettings"; +import { formatNumber } from "@/utils/number"; import { Metadata } from "next"; async function getData() { @@ -33,7 +34,9 @@ export async function generateMetadata(): Promise { description: description + ` - Players currently online: ${data.history[data.history.length - 1].value}`, + Players currently online: ${formatNumber( + data.history[data.history.length - 1].value, + )}`, }, }; }