fix: format compact number utils (#4695)

This commit is contained in:
Faisal Amir 2025-02-19 13:58:43 +07:00 committed by GitHub
parent c4d7a143eb
commit 4abd471a5f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,5 +1,5 @@
export function formatCompactNumber(count: number) {
const formatter = Intl.NumberFormat('en', { notation: 'compact' })
const formatter = Intl.NumberFormat('en', { notation: 'compact', maximumFractionDigits: 1 })
return formatter.format(count)
}