mirror of
https://github.com/umami-software/umami.git
synced 2026-02-07 14:17:13 +01:00
Support event type filtering.
This commit is contained in:
parent
45c9ea9c22
commit
2e69e57445
7 changed files with 39 additions and 29 deletions
|
|
@ -4,6 +4,11 @@ import { useDateParameters } from '../useDateParameters';
|
|||
import { usePagedQuery } from '../usePagedQuery';
|
||||
import { ReactQueryOptions } from '@/lib/types';
|
||||
|
||||
const EVENT_TYPES = {
|
||||
views: 1,
|
||||
events: 2,
|
||||
};
|
||||
|
||||
export function useWebsiteEventsQuery(
|
||||
websiteId: string,
|
||||
params?: Record<string, any>,
|
||||
|
|
@ -20,7 +25,7 @@ export function useWebsiteEventsQuery(
|
|||
...date,
|
||||
...filters,
|
||||
...pageParams,
|
||||
...params,
|
||||
eventType: EVENT_TYPES[params.view],
|
||||
}),
|
||||
enabled: !!websiteId,
|
||||
...options,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue