Fixed bug with rankings display.

This commit is contained in:
Mike Cao committed 2020-08-19 23:30:31 -07:00
1 parent b905824d50
commit d95e149cf6
3 files changed
+8 -5

No files matched your search

+4 -1
View File
@@ -44,7 +44,9 @@ export function formatNumber(n) {
return Number(n).toFixed(0);
}
export function formatLongNumber(n) {
export function formatLongNumber(value) {
const n = Number(value);
if (n >= 1000000) {
return `${(n / 1000000).toFixed(1)}m`;
}
@@ -57,5 +59,6 @@ export function formatLongNumber(n) {
if (n >= 1000) {
return `${(n / 1000).toFixed(2)}k`;
}
return formatNumber(n);
}