1
0
Fork 0

feat: add /trainings page

- list of trainings
- add button (taken from github: vojtechmares/website)
- add currency formatter
This commit is contained in:
Vojtěch Mareš 2023-06-25 17:06:17 +02:00
parent 40b68902f7
commit 623b018a1b
Signed by: vojtech.mares
GPG key ID: C6827B976F17240D
3 changed files with 201 additions and 0 deletions

View file

@ -0,0 +1,9 @@
export function formatCurrency(price: number | bigint, locale: string = 'en-US', currency: string = 'CZK'): string {
const currencyFormatter = new Intl.NumberFormat(locale, {
style: 'currency',
currency: currency,
maximumFractionDigits: 0,
});
return currencyFormatter.format(price).replace(',', ' ')
}