Fix number formatting (im dumb)

This commit is contained in:
Liam 2022-10-29 11:29:03 +01:00
parent 664e497e87
commit d498d75b46
3 changed files with 12 additions and 11 deletions

@ -1,10 +1,8 @@
/** @type {import('next').NextConfig} */ /** @type {import('next').NextConfig} */
const nextConfig = { const nextConfig = {
experimental: {
optimizeCss: true,
},
output: "standalone", output: "standalone",
swcMinify: true, swcMinify: true,
compress: true,
images: { images: {
domains: [ domains: [
"cdn.scoresaber.com", "cdn.scoresaber.com",
@ -14,6 +12,9 @@ const nextConfig = {
"avatars.akamai.steamstatic.com", "avatars.akamai.steamstatic.com",
], ],
}, },
experimental: {
optimizeCss: true,
},
}; };
module.exports = nextConfig; module.exports = nextConfig;

@ -47,8 +47,8 @@ const PlayerStats = () => {
<div className={styles.playerStats}> <div className={styles.playerStats}>
<p> <p>
{pp.toLocaleString("en-us", { {pp.toLocaleString("en-us", {
maximumSignificantDigits: 2, maximumFractionDigits: 2,
minimumSignificantDigits: 2, minimumFractionDigits: 2,
})} })}
pp{" "} pp{" "}
<span <span
@ -62,16 +62,16 @@ const PlayerStats = () => {
<p> <p>
# #
{globalPos.toLocaleString("en-us", { {globalPos.toLocaleString("en-us", {
maximumSignificantDigits: 2, maximumFractionDigits: 2,
minimumSignificantDigits: 2, minimumFractionDigits: 2,
})} })}
</p> </p>
<div className={styles.playerCountry}> <div className={styles.playerCountry}>
<p> <p>
# #
{countryRank.toLocaleString("en-us", { {countryRank.toLocaleString("en-us", {
maximumSignificantDigits: 2, maximumFractionDigits: 2,
minimumSignificantDigits: 2, minimumFractionDigits: 2,
})} })}
</p> </p>
<ReactCountryFlag <ReactCountryFlag

@ -28,8 +28,8 @@ export default function ScoreStats() {
<p>{percentage}</p> <p>{percentage}</p>
<p> <p>
{currentScore.toLocaleString("en-us", { {currentScore.toLocaleString("en-us", {
maximumSignificantDigits: 2, maximumFractionDigits: 2,
minimumSignificantDigits: 2, minimumFractionDigits: 2,
})} })}
</p> </p>
{currentPP !== undefined ? <p>{currentPP.toFixed(0)}pp</p> : null} {currentPP !== undefined ? <p>{currentPP.toFixed(0)}pp</p> : null}