Skip to content

Commit

Permalink
round compact values up
Browse files Browse the repository at this point in the history
  • Loading branch information
vkulinich-cl committed Jun 7, 2024
1 parent b3c08c7 commit 67f9418
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils/formatting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ export const formatNum = (

try {
const n = typeof number === "number" ? number : parseFloat(number)
return new Intl.NumberFormat(locales, options).format(n)

return new Intl.NumberFormat(locales, options).format(Math.ceil(n))
} catch (err) {
return null
}
Expand Down

0 comments on commit 67f9418

Please sign in to comment.