mirror of
https://github.com/umami-software/umami.git
synced 2026-02-05 13:17:19 +01:00
Merge branch 'dev' into os-names
This commit is contained in:
commit
37e28bbf74
472 changed files with 5460 additions and 5026 deletions
|
|
@ -2,7 +2,7 @@ import useMessages from './useMessages';
|
|||
import { BROWSERS, OS_NAMES } from 'lib/constants';
|
||||
import useLocale from './useLocale';
|
||||
import useCountryNames from './useCountryNames';
|
||||
import regions from 'public/iso-3166-2.json';
|
||||
import regions from '../../../public/iso-3166-2.json';
|
||||
|
||||
export function useFormat() {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
|
|
@ -31,7 +31,7 @@ export function useFormat() {
|
|||
};
|
||||
|
||||
const formatCity = (value: string, country?: string): string => {
|
||||
return `${value}, ${countryNames[country]}`;
|
||||
return countryNames[country] ? `${value}, ${countryNames[country]}` : value;
|
||||
};
|
||||
|
||||
const formatValue = (value: string, type: string, data?: { [key: string]: any }): string => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue