toFixed with SP/XP for more consistency

This commit is contained in:
Kalle
2024-06-23 10:04:30 +03:00
parent 245fce8148
commit 182e9b22a2
3 changed files with 14 additions and 6 deletions

View File

@@ -442,7 +442,9 @@ function PlayersTable({
➜ +{entry.pendingPlusTier}
</div>
) : null}
<div className="placements__table__power">{entry.power}</div>
<div className="placements__table__power">
{entry.power.toFixed(2)}
</div>
</div>
</Link>
</React.Fragment>
@@ -499,7 +501,9 @@ function TeamTable({
);
})}
</div>
<div className="placements__table__power">{entry.power}</div>
<div className="placements__table__power">
{entry.power.toFixed(2)}
</div>
</div>
</div>
{i === 11 && showQualificationDividers ? (
@@ -539,7 +543,9 @@ function XPTable({ entries }: { entries: XPLeaderboardItem[] }) {
height={32}
/>
<div>{entry.name}</div>
<div className="placements__table__power">{entry.power}</div>
<div className="placements__table__power">
{entry.power.toFixed(1)}
</div>
</div>
</Link>
);

View File

@@ -78,7 +78,7 @@ export function PlacementsTable({
</div>
) : null}
</div>
<div>{placement.power}</div>
<div>{placement.power.toFixed(1)}</div>
</Link>
))}
</div>

View File

@@ -322,10 +322,12 @@ function Rank({ currentOrdinal }: { currentOrdinal: number }) {
</Popover>
</div>
) : null}
<div className="text-lg font-bold">{ordinalToSp(currentOrdinal)}SP</div>
<div className="text-lg font-bold">
{ordinalToSp(currentOrdinal).toFixed(2)}SP
</div>
{!peakAndCurrentSame ? (
<div className="text-lighter text-sm">
{t("user:seasons.peak")} {ordinalToSp(maxOrdinal)}SP
{t("user:seasons.peak")} {ordinalToSp(maxOrdinal).toFixed(2)}SP
</div>
) : null}
{topTenPlacement ? (