mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
Fixed bug with rankings display.
This commit is contained in:
parent
b905824d50
commit
d95e149cf6
3 changed files with 8 additions and 5 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue