From eaa9b1aa545d49f77f3aaa1b37ad73684333df2c Mon Sep 17 00:00:00 2001 From: lulunac27a Date: Fri, 19 Jan 2024 20:59:55 -0600 Subject: [PATCH] Add one digits after K (thousand) for Total XP and XP gained The string representation should be at least one decimal place after K (thousand) for Total XP earned, and Recent XP gained to make it more accurate. --- src/common/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/utils.ts b/src/common/utils.ts index 6eafd91..37befa9 100644 --- a/src/common/utils.ts +++ b/src/common/utils.ts @@ -20,7 +20,7 @@ export function encodeHTML(str: string) { export function kFormatter(num: number) { return Math.abs(num) > 999 ? - trunc(num / 1000) + 'k' : + trunc(num / 1000, 1) + 'k' : num }