Merge remote-tracking branch 'parent/main' into upstream-20240403

This commit is contained in:
KMY 2024-04-03 12:12:09 +09:00
commit 479c4fecc1
63 changed files with 831 additions and 391 deletions

View file

@ -70,10 +70,10 @@ export function roundTo10(num: number): number {
return Math.round(num * 0.1) / 0.1;
}
export function toCappedNumber(num: string): string {
if (parseInt(num) > 99) {
return '99+';
export function toCappedNumber(num: number, max = 99): string {
if (num > max) {
return `${max}+`;
} else {
return num;
return num.toString();
}
}