Fix SP team in match timeline not rounded
Some checks are pending
E2E Tests / e2e (push) Waiting to run
Tests and checks on push / run-checks-and-tests (push) Waiting to run
Updates translation progress / update-translation-progress-issue (push) Waiting to run

This commit is contained in:
Kalle 2026-05-05 07:16:09 +03:00
parent 8784046935
commit 84f4757409

View File

@ -18,6 +18,7 @@ import type {
StageId,
} from "~/modules/in-game-lists/types";
import type { CommonUser } from "~/utils/kysely.server";
import { roundToNDecimalPlaces } from "~/utils/number";
import { Avatar } from "../Avatar";
import { SendouButton } from "../elements/Button";
import { SendouPopover } from "../elements/Popover";
@ -540,7 +541,7 @@ function SpTeamDetail({
}) {
if (skillDifference.calculated) {
const { oldSp, newSp } = skillDifference;
const diff = newSp - oldSp;
const diff = roundToNDecimalPlaces(newSp - oldSp);
const isPositive = diff > 0;
const arrow = isPositive ? "▲" : "▼";