Fixed UTM query. Fixed types.

This commit is contained in:
Mike Cao 2024-03-21 22:59:53 -07:00
parent b3cad83f08
commit b873ea38ea
5 changed files with 47 additions and 19 deletions

View file

@ -7,7 +7,7 @@ export function useFilterQuery<T = any>({
queryKey,
queryFn,
...options
}: UseQueryOptions): FilterQueryResult<T> {
}: Omit<UseQueryOptions, 'queryFn'> & { queryFn: (params?: object) => any }): FilterQueryResult<T> {
const [params, setParams] = useState<T | SearchFilter>({
query: '',
page: 1,

View file

@ -45,6 +45,7 @@ async function relationalQuery(
where website_id = {{websiteId::uuid}}
and created_at between {{startDate}} and {{endDate}}
and url_query is not null
and event_type = 1
group by 1
`,
{
@ -83,6 +84,7 @@ async function clickhouseQuery(
where website_id = {websiteId:UUID}
and created_at between {startDate:DateTime64} and {endDate:DateTime64}
and url_query != ''
and event_type = 1
group by 1
`,
{