fix(dashboard): format currency sign (#8936)

**What**
- change `formatCurrency` admin util to show sign only for negative numbers

---

FIXES CC-335
This commit is contained in:
Frane Polić
2024-09-02 11:57:45 +00:00
committed by GitHub
parent 56ceeeb4c7
commit b5ec6c9003
2 changed files with 2 additions and 2 deletions
@@ -2,6 +2,6 @@ export const formatCurrency = (amount: number, currency: string) => {
return new Intl.NumberFormat("en-US", { return new Intl.NumberFormat("en-US", {
style: "currency", style: "currency",
currency, currency,
signDisplay: "always", signDisplay: "auto",
}).format(amount) }).format(amount)
} }
@@ -96,7 +96,7 @@ const Refund = ({
const RefundNoteIndicator = refund.note && ( const RefundNoteIndicator = refund.note && (
<Tooltip content={refund.note}> <Tooltip content={refund.note}>
<DocumentText className="text-ui-tag-neutral-icon inline ml-1" /> <DocumentText className="text-ui-tag-neutral-icon ml-1 inline" />
</Tooltip> </Tooltip>
) )