diff --git a/src/components/Utilities/Currency.jsx b/src/components/Utilities/Currency.jsx index 1c42e1ded..f8461512d 100644 --- a/src/components/Utilities/Currency.jsx +++ b/src/components/Utilities/Currency.jsx @@ -22,9 +22,16 @@ export const Currency = ({ const maxDigits = isZeroDecimal(currency) ? 0 : maximumFractionDigits; let formattedAmount = numberFormat(amount, currency, locale, maxDigits, compact); + + const isNegative = amount < 0; + if (isNegative) { + formattedAmount = formattedAmount.replace("-", ""); + } + if (compact) { return ( + {isNegative && "-"} {getSymbol(currency, locale, isNarrowSymbolForm)} {formattedAmount} @@ -32,7 +39,12 @@ export const Currency = ({ } formattedAmount = shouldRemoveTrailingZeroes ? formattedAmount.replace(".00", "") : formattedAmount; - return {formattedAmount}; + return ( + + {isNegative && "-"} + {formattedAmount} + + ); }; Currency.propTypes = {