mirror of
https://github.com/kremalicious/umami.git
synced 2025-02-05 17:05:46 +01:00
Fixes for country search.
This commit is contained in:
parent
8925283564
commit
98352628cb
@ -1,9 +1,6 @@
|
|||||||
import MetricsTable, { MetricsTableProps } from './MetricsTable';
|
import MetricsTable, { MetricsTableProps } from './MetricsTable';
|
||||||
import { emptyFilter } from 'lib/filters';
|
import { emptyFilter } from 'lib/filters';
|
||||||
import FilterLink from 'components/common/FilterLink';
|
import FilterLink from 'components/common/FilterLink';
|
||||||
|
|
||||||
import TypeIcon from 'components/common/TypeIcon';
|
|
||||||
import { useLocale } from 'components/hooks';
|
|
||||||
import { useMessages } from 'components/hooks';
|
import { useMessages } from 'components/hooks';
|
||||||
import { useFormat } from 'components/hooks';
|
import { useFormat } from 'components/hooks';
|
||||||
|
|
||||||
@ -16,7 +13,9 @@ export function CitiesTable(props: MetricsTableProps) {
|
|||||||
<FilterLink id="city" value={city} label={formatCity(city, country)}>
|
<FilterLink id="city" value={city} label={formatCity(city, country)}>
|
||||||
{country && (
|
{country && (
|
||||||
<img
|
<img
|
||||||
src={`${process.env.basePath}/images/flags/${country?.toLowerCase() || 'xx'}.png`}
|
src={`${process.env.basePath || ''}/images/country/${
|
||||||
|
country?.toLowerCase() || 'xx'
|
||||||
|
}.png`}
|
||||||
alt={country}
|
alt={country}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
@ -29,7 +29,6 @@ export function CountriesTable({ ...props }: MetricsTableProps) {
|
|||||||
type="country"
|
type="country"
|
||||||
metric={formatMessage(labels.visitors)}
|
metric={formatMessage(labels.visitors)}
|
||||||
renderLabel={renderLink}
|
renderLabel={renderLink}
|
||||||
onDataLoad={handleDataLoad}
|
|
||||||
searchFormattedValues={true}
|
searchFormattedValues={true}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
@ -55,22 +55,8 @@ export function MetricsTable({
|
|||||||
|
|
||||||
const { data, isLoading, isFetched, error } = useWebsiteMetrics(
|
const { data, isLoading, isFetched, error } = useWebsiteMetrics(
|
||||||
websiteId,
|
websiteId,
|
||||||
{ type, limit, search, ...params },
|
{ type, limit, search: searchFormattedValues ? undefined : search, ...params },
|
||||||
{
|
{
|
||||||
type,
|
|
||||||
startAt: +startDate,
|
|
||||||
endAt: +endDate,
|
|
||||||
url,
|
|
||||||
referrer,
|
|
||||||
os,
|
|
||||||
title,
|
|
||||||
browser,
|
|
||||||
device,
|
|
||||||
country,
|
|
||||||
region,
|
|
||||||
city,
|
|
||||||
limit,
|
|
||||||
search: (searchFormattedValues) ? undefined : search,
|
|
||||||
retryDelay: delay || DEFAULT_ANIMATION_DURATION,
|
retryDelay: delay || DEFAULT_ANIMATION_DURATION,
|
||||||
onDataLoad,
|
onDataLoad,
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user