From 6c9554f9a03228991471cc5f46025b7dcf2b7166 Mon Sep 17 00:00:00 2001 From: Liam Date: Mon, 23 Oct 2023 11:39:48 +0100 Subject: [PATCH] added number formatting to some values --- src/app/player/[id]/page.tsx | 4 ++-- src/components/player/PlayerInfo.tsx | 4 ++-- src/components/player/Score.tsx | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/app/player/[id]/page.tsx b/src/app/player/[id]/page.tsx index f34a472..d7c0339 100644 --- a/src/app/player/[id]/page.tsx +++ b/src/app/player/[id]/page.tsx @@ -22,10 +22,10 @@ export async function generateMetadata({ const description = ` View ${player.name}'s scores, top plays, and more. - Rank: #${player.rank} (#${formatNumber( + Rank: #${formatNumber(player.rank)} (#${formatNumber( player.countryRank, )} - ${normalizedRegionName(player.country)}) - PP: ${player.pp} + PP: ${formatNumber(player.pp)} Play Count: ${formatNumber(player.scoreStats.totalPlayCount)}`; return { diff --git a/src/components/player/PlayerInfo.tsx b/src/components/player/PlayerInfo.tsx index eb3ff97..8233b5a 100644 --- a/src/components/player/PlayerInfo.tsx +++ b/src/components/player/PlayerInfo.tsx @@ -171,7 +171,7 @@ export default function PlayerInfo({ playerData }: PlayerInfoProps) { playerData.rank / 50, )}`} > -

#{playerData.rank}

+

#{formatNumber(playerData.rank)}

@@ -188,7 +188,7 @@ export default function PlayerInfo({ playerData }: PlayerInfoProps) { svg className="!h-7 !w-7" /> -

#{playerData.countryRank}

+

#{formatNumber(playerData.countryRank)}

diff --git a/src/components/player/Score.tsx b/src/components/player/Score.tsx index 307e655..ed08212 100644 --- a/src/components/player/Score.tsx +++ b/src/components/player/Score.tsx @@ -26,7 +26,7 @@ export default function Score({ score, player, leaderboard }: ScoreProps) {
-

#{score.rank}

+

#{formatNumber(score.rank)}

-

#{score.rank}

+

#{formatNumber(score.rank)}

{/* Time Set (Mobile) */}