mirror of
https://github.com/umami-software/umami.git
synced 2026-02-09 15:17:23 +01:00
New overview layout.
Some checks failed
Node.js CI / build (postgresql, 18.18) (push) Has been cancelled
Some checks failed
Node.js CI / build (postgresql, 18.18) (push) Has been cancelled
This commit is contained in:
parent
bab4f8ebcc
commit
5f27ba149b
5 changed files with 45 additions and 42 deletions
|
|
@ -67,6 +67,7 @@ export function MetricsExpandedTable({
|
|||
isLoading={isLoading}
|
||||
error={error}
|
||||
height="100%"
|
||||
loadingIcon="spinner"
|
||||
>
|
||||
<Column overflowY="auto" minHeight="0" height="100%" paddingRight="3" overflow="hidden">
|
||||
{items && (
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ import classNames from 'classnames';
|
|||
import { colord } from 'colord';
|
||||
import { ISO_COUNTRIES, MAP_FILE } from '@/lib/constants';
|
||||
import {
|
||||
useDateRange,
|
||||
useWebsiteMetricsQuery,
|
||||
useCountryNames,
|
||||
useLocale,
|
||||
|
|
@ -30,14 +29,11 @@ export function WorldMap({ websiteId, data, className, ...props }: WorldMapProps
|
|||
const { countryNames } = useCountryNames(locale);
|
||||
const visitorsLabel = formatMessage(labels.visitors).toLocaleLowerCase(locale);
|
||||
const unknownLabel = formatMessage(labels.unknown);
|
||||
const {
|
||||
dateRange: { startDate, endDate },
|
||||
} = useDateRange(websiteId);
|
||||
|
||||
const { data: mapData } = useWebsiteMetricsQuery(websiteId, {
|
||||
type: 'country',
|
||||
startAt: +startDate,
|
||||
endAt: +endDate,
|
||||
});
|
||||
|
||||
const metrics = useMemo(
|
||||
() => (data || mapData ? percentFilter((data || mapData) as any[]) : []),
|
||||
[data, mapData],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue