diff options
| author | ertopogo <erwin.t.pombett@gmail.com> | 2026-02-01 02:53:13 +0100 |
|---|---|---|
| committer | ertopogo <erwin.t.pombett@gmail.com> | 2026-02-01 02:53:13 +0100 |
| commit | bc6f65dc9afa29fbb94038b1cfd5cbee2d87719c (patch) | |
| tree | 745095c67dc674567d4e0823388252b104a2e17e /storefront/lib/format.js | |
| parent | e704383cb20e7016794ccc793eda057a609be835 (diff) | |
feat: mise à jour storefront + checkout
Diffstat (limited to 'storefront/lib/format.js')
| -rw-r--r-- | storefront/lib/format.js | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/storefront/lib/format.js b/storefront/lib/format.js index 2f44c2e..9e92a8b 100644 --- a/storefront/lib/format.js +++ b/storefront/lib/format.js @@ -1,11 +1,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) -} +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)
+}
|
