From d498d75b46f361a7eb718ea7ad6e1c6600e355f2 Mon Sep 17 00:00:00 2001 From: Liam <67254223+RealFascinated@users.noreply.github.com> Date: Sat, 29 Oct 2022 11:29:03 +0100 Subject: [PATCH] Fix number formatting (im dumb) --- next.config.js | 7 ++++--- src/components/PlayerStats.js | 12 ++++++------ src/components/ScoreStats.js | 4 ++-- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/next.config.js b/next.config.js index 292323f..fae69a9 100644 --- a/next.config.js +++ b/next.config.js @@ -1,10 +1,8 @@ /** @type {import('next').NextConfig} */ const nextConfig = { - experimental: { - optimizeCss: true, - }, output: "standalone", swcMinify: true, + compress: true, images: { domains: [ "cdn.scoresaber.com", @@ -14,6 +12,9 @@ const nextConfig = { "avatars.akamai.steamstatic.com", ], }, + experimental: { + optimizeCss: true, + }, }; module.exports = nextConfig; diff --git a/src/components/PlayerStats.js b/src/components/PlayerStats.js index ca3160c..6b895a1 100644 --- a/src/components/PlayerStats.js +++ b/src/components/PlayerStats.js @@ -47,8 +47,8 @@ const PlayerStats = () => {

{pp.toLocaleString("en-us", { - maximumSignificantDigits: 2, - minimumSignificantDigits: 2, + maximumFractionDigits: 2, + minimumFractionDigits: 2, })} pp{" "} {

# {globalPos.toLocaleString("en-us", { - maximumSignificantDigits: 2, - minimumSignificantDigits: 2, + maximumFractionDigits: 2, + minimumFractionDigits: 2, })}

# {countryRank.toLocaleString("en-us", { - maximumSignificantDigits: 2, - minimumSignificantDigits: 2, + maximumFractionDigits: 2, + minimumFractionDigits: 2, })}

{percentage}

{currentScore.toLocaleString("en-us", { - maximumSignificantDigits: 2, - minimumSignificantDigits: 2, + maximumFractionDigits: 2, + minimumFractionDigits: 2, })}

{currentPP !== undefined ?

{currentPP.toFixed(0)}pp

: null}