refactor: extract the price formatter

This commit is contained in:
Oliver Davies 2023-10-23 00:50:08 +01:00
parent 1aa45f9270
commit fe032622fa
2 changed files with 8 additions and 6 deletions

7
src/price-formatter.ts Normal file
View file

@ -0,0 +1,7 @@
const priceFormatter = new Intl.NumberFormat('en-GB', {
currency: 'GBP',
maximumSignificantDigits: 2,
style: 'currency',
});
export default priceFormatter;