mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 23:57:12 +01:00
Added metrics bar and date range to sessions.
This commit is contained in:
parent
36663bd52d
commit
b9068c0050
44 changed files with 859 additions and 739 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import useApi from './useApi';
|
||||
import { UseQueryOptions } from '@tanstack/react-query';
|
||||
import { useFilterParams } from '../useFilterParams';
|
||||
import { useFilterQuery } from 'components/hooks';
|
||||
import { usePagedQuery } from 'components/hooks';
|
||||
|
||||
export function useWebsiteEvents(
|
||||
websiteId: string,
|
||||
|
|
@ -10,7 +10,7 @@ export function useWebsiteEvents(
|
|||
const { get } = useApi();
|
||||
const params = useFilterParams(websiteId);
|
||||
|
||||
return useFilterQuery({
|
||||
return usePagedQuery({
|
||||
queryKey: ['websites:events', { websiteId, ...params }],
|
||||
queryFn: pageParams =>
|
||||
get(`/websites/${websiteId}/events`, { ...params, ...pageParams, pageSize: 20 }),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue