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