Show one decimal point on clips
This commit is contained in:
parent
8d97eb6f63
commit
6614833cb1
|
@ -7,9 +7,13 @@ const formatter = new Intl.NumberFormat('en-US', {
|
|||
minimumFractionDigits: 0,
|
||||
})
|
||||
|
||||
// export function formatMoney(amount: number) {
|
||||
// const newAmount = Math.round(amount) === 0 ? 0 : Math.floor(amount) // handle -0 case
|
||||
// return ENV_CONFIG.moneyMoniker + formatter.format(newAmount).replace('$', '')
|
||||
// }
|
||||
|
||||
export function formatMoney(amount: number) {
|
||||
const newAmount = Math.round(amount) === 0 ? 0 : Math.floor(amount) // handle -0 case
|
||||
return ENV_CONFIG.moneyMoniker + formatter.format(newAmount).replace('$', '')
|
||||
return ENV_CONFIG.moneyMoniker + amount.toFixed(1)
|
||||
}
|
||||
|
||||
export function formatWithCommas(amount: number) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user