From 182e9b22a2163d402c096eec4f31a5f5f35a6ff7 Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Sun, 23 Jun 2024 10:04:30 +0300 Subject: [PATCH] toFixed with SP/XP for more consistency --- app/features/leaderboards/routes/leaderboards.tsx | 12 +++++++++--- app/features/top-search/components/Placements.tsx | 2 +- .../user-page/routes/u.$identifier.seasons.tsx | 6 ++++-- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/app/features/leaderboards/routes/leaderboards.tsx b/app/features/leaderboards/routes/leaderboards.tsx index e693f9cc4..cc1a2263f 100644 --- a/app/features/leaderboards/routes/leaderboards.tsx +++ b/app/features/leaderboards/routes/leaderboards.tsx @@ -442,7 +442,9 @@ function PlayersTable({ ➜ +{entry.pendingPlusTier} ) : null} -
{entry.power}
+
+ {entry.power.toFixed(2)} +
@@ -499,7 +501,9 @@ function TeamTable({ ); })} -
{entry.power}
+
+ {entry.power.toFixed(2)} +
{i === 11 && showQualificationDividers ? ( @@ -539,7 +543,9 @@ function XPTable({ entries }: { entries: XPLeaderboardItem[] }) { height={32} />
{entry.name}
-
{entry.power}
+
+ {entry.power.toFixed(1)} +
); diff --git a/app/features/top-search/components/Placements.tsx b/app/features/top-search/components/Placements.tsx index 2a6f2286a..8e0fd5efe 100644 --- a/app/features/top-search/components/Placements.tsx +++ b/app/features/top-search/components/Placements.tsx @@ -78,7 +78,7 @@ export function PlacementsTable({ ) : null} -
{placement.power}
+
{placement.power.toFixed(1)}
))} diff --git a/app/features/user-page/routes/u.$identifier.seasons.tsx b/app/features/user-page/routes/u.$identifier.seasons.tsx index e7c43d9ee..9dbb5c7a9 100644 --- a/app/features/user-page/routes/u.$identifier.seasons.tsx +++ b/app/features/user-page/routes/u.$identifier.seasons.tsx @@ -322,10 +322,12 @@ function Rank({ currentOrdinal }: { currentOrdinal: number }) { ) : null} -
{ordinalToSp(currentOrdinal)}SP
+
+ {ordinalToSp(currentOrdinal).toFixed(2)}SP +
{!peakAndCurrentSame ? (
- {t("user:seasons.peak")} {ordinalToSp(maxOrdinal)}SP + {t("user:seasons.peak")} {ordinalToSp(maxOrdinal).toFixed(2)}SP
) : null} {topTenPlacement ? (