mirror of
https://github.com/umami-software/umami.git
synced 2026-02-12 00:27:11 +01:00
Updated session profile page. Added TypeIcon component. Added useRegionNames hook.
This commit is contained in:
parent
ac60d08ee5
commit
c3c3b46ef6
313 changed files with 197 additions and 94 deletions
|
|
@ -2,6 +2,7 @@ import FilterLink from 'components/common/FilterLink';
|
|||
import { useCountryNames } from 'components/hooks';
|
||||
import { useLocale, useMessages, useFormat } from 'components/hooks';
|
||||
import MetricsTable, { MetricsTableProps } from './MetricsTable';
|
||||
import TypeIcon from 'components/common/TypeIcon';
|
||||
|
||||
export function CountriesTable({
|
||||
onDataLoad,
|
||||
|
|
@ -10,7 +11,7 @@ export function CountriesTable({
|
|||
onDataLoad: (data: any) => void;
|
||||
} & MetricsTableProps) {
|
||||
const { locale } = useLocale();
|
||||
const countryNames = useCountryNames(locale);
|
||||
const { countryNames } = useCountryNames(locale);
|
||||
const { formatMessage, labels } = useMessages();
|
||||
const { formatCountry } = useFormat();
|
||||
|
||||
|
|
@ -26,10 +27,7 @@ export function CountriesTable({
|
|||
value={countryNames[code] && code}
|
||||
label={formatCountry(code)}
|
||||
>
|
||||
<img
|
||||
src={`${process.env.basePath || ''}/images/flags/${code?.toLowerCase() || 'xx'}.png`}
|
||||
alt={code}
|
||||
/>
|
||||
<TypeIcon type="country" value={code?.toLowerCase()} />
|
||||
</FilterLink>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue