feat: add /trainings page
- list of trainings - add button (taken from github: vojtechmares/website) - add currency formatter
This commit is contained in:
parent
40b68902f7
commit
623b018a1b
3 changed files with 201 additions and 0 deletions
9
lib/currency/formatter.ts
Normal file
9
lib/currency/formatter.ts
Normal 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(',', ' ')
|
||||
}
|
||||
Reference in a new issue