mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 15:47:13 +01:00
Moved events components to events page. Updated map data loading.
This commit is contained in:
parent
c6b8114945
commit
f135e4ffbb
8 changed files with 52 additions and 35 deletions
|
|
@ -4,21 +4,12 @@ import { useLocale, useMessages, useFormat } from 'components/hooks';
|
|||
import MetricsTable, { MetricsTableProps } from './MetricsTable';
|
||||
import TypeIcon from 'components/common/TypeIcon';
|
||||
|
||||
export function CountriesTable({
|
||||
onDataLoad,
|
||||
...props
|
||||
}: {
|
||||
onDataLoad: (data: any) => void;
|
||||
} & MetricsTableProps) {
|
||||
export function CountriesTable({ ...props }: MetricsTableProps) {
|
||||
const { locale } = useLocale();
|
||||
const { countryNames } = useCountryNames(locale);
|
||||
const { formatMessage, labels } = useMessages();
|
||||
const { formatCountry } = useFormat();
|
||||
|
||||
const handleDataLoad = (data: any) => {
|
||||
onDataLoad?.(data);
|
||||
};
|
||||
|
||||
const renderLink = ({ x: code }) => {
|
||||
return (
|
||||
<FilterLink
|
||||
|
|
@ -39,7 +30,6 @@ export function CountriesTable({
|
|||
type="country"
|
||||
metric={formatMessage(labels.visitors)}
|
||||
renderLabel={renderLink}
|
||||
onDataLoad={handleDataLoad}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue