Skip to content

Commit d576d26

Browse files
committed
Add INR currency support with formatting function
Signed-off-by: Lee Calcote <lee.calcote@layer5.io>
1 parent 03a1a00 commit d576d26

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/utils/currencies.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,18 @@ export const Currencies = {
2424
maximumFractionDigits: 2,
2525
}).format(price * 0.86),
2626
},
27+
INR: {
28+
name: "INR",
29+
symbol: "₹",
30+
rate: 88.32,
31+
formatPrice: (price) =>
32+
new Intl.NumberFormat("en-US", {
33+
style: "currency",
34+
currency: "INR",
35+
minimumFractionDigits: 0,
36+
maximumFractionDigits: 2,
37+
}).format(price * rate),
38+
},
2739
};
2840

2941

0 commit comments

Comments
 (0)