1 2 3 4 5 6 7 8 9 10 11
export const formatAmount = (amount, currencyCode = "EUR") => { if (typeof amount !== "number") { return "" } const normalizedCurrency = currencyCode.toUpperCase() return new Intl.NumberFormat("fr-FR", { style: "currency", currency: normalizedCurrency, }).format(amount / 100) }