diff --git a/common/util/format.ts b/common/util/format.ts index 10b7c1de..6260d74f 100644 --- a/common/util/format.ts +++ b/common/util/format.ts @@ -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) {