mirror of
https://github.com/umami-software/umami.git
synced 2026-02-09 15:17:23 +01:00
feat: Add default currency support and update currency handling in Revenue component
This commit is contained in:
parent
860e6390f1
commit
4eddac21c7
4 changed files with 19 additions and 4 deletions
|
|
@ -1,3 +1,5 @@
|
|||
import { DEFAULT_CURRENCY } from './constants';
|
||||
|
||||
export function parseTime(val: number) {
|
||||
const days = ~~(val / 86400);
|
||||
const hours = ~~(val / 3600) - days * 24;
|
||||
|
|
@ -94,7 +96,7 @@ export function formatCurrency(value: number, currency: string, locale = 'en-US'
|
|||
// Fallback to default currency format if an error occurs
|
||||
formattedValue = new Intl.NumberFormat(locale, {
|
||||
style: 'currency',
|
||||
currency: 'USD',
|
||||
currency: DEFAULT_CURRENCY,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue