fix: number format

This commit is contained in:
Alejandro Gomez 2023-02-03 22:59:35 +01:00
parent d0bc7f83fb
commit a134086807
No known key found for this signature in database
GPG Key ID: 4DF39E566658C817
1 changed files with 2 additions and 2 deletions

View File

@ -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`
}
}