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

View File

@ -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;

View File

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

View File

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