fix: number format
This commit is contained in:
parent
d0bc7f83fb
commit
a134086807
@ -7,8 +7,8 @@ export function formatShort(n: number) {
|
|||||||
if (n < 999) {
|
if (n < 999) {
|
||||||
return n
|
return n
|
||||||
} else if (n < 1e8) {
|
} else if (n < 1e8) {
|
||||||
return `${intl.format(Math.floor(n / 1e3))}K`
|
return `${intl.format(n / 1e3)}K`
|
||||||
} else {
|
} else {
|
||||||
return `${intl.format(Math.floor(n / 1e6))}M`
|
return `${intl.format(n / 1e6)}M`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user