refactor: extract the price formatter
This commit is contained in:
parent
1aa45f9270
commit
fe032622fa
2 changed files with 8 additions and 6 deletions
7
src/price-formatter.ts
Normal file
7
src/price-formatter.ts
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
const priceFormatter = new Intl.NumberFormat('en-GB', {
|
||||
currency: 'GBP',
|
||||
maximumSignificantDigits: 2,
|
||||
style: 'currency',
|
||||
});
|
||||
|
||||
export default priceFormatter;
|
||||
Loading…
Add table
Add a link
Reference in a new issue