move tabs into own pages
tinyedge/deploy Deployed by TinyEdge

This commit is contained in:
2026-08-07 15:49:43 +02:00
parent cbe1b42f6e
commit 99a9f908f1
13 changed files with 321 additions and 325 deletions
+9 -1
View File
@@ -6,8 +6,16 @@ export function fromCents(cents: number): number {
return cents / 100;
}
const LOCALE_BY_CURRENCY: Record<string, string> = {
EUR: 'de-DE',
USD: 'en-US',
GBP: 'en-GB',
CHF: 'fr-CH',
};
export function formatCurrency(cents: number, currency: string): string {
return new Intl.NumberFormat(undefined, {
const locale = LOCALE_BY_CURRENCY[currency] ?? 'de-DE';
return new Intl.NumberFormat(locale, {
style: 'currency',
currency,
}).format(fromCents(cents));