Renamed id routes for API.
This commit is contained in:
@@ -4,7 +4,7 @@ import { UseQueryOptions } from '@tanstack/react-query';
|
||||
export function useWebsiteMetrics(
|
||||
websiteId: string,
|
||||
params?: { [key: string]: any },
|
||||
options?: Omit<UseQueryOptions, 'queryKey' | 'queryFn'>,
|
||||
options?: Omit<UseQueryOptions & { onDataLoad?: (data: any) => void }, 'queryKey' | 'queryFn'>,
|
||||
) {
|
||||
const { get, useQuery } = useApi();
|
||||
|
||||
@@ -25,6 +25,8 @@ export function useWebsiteMetrics(
|
||||
...filters,
|
||||
});
|
||||
|
||||
options?.onDataLoad?.(data);
|
||||
|
||||
return data;
|
||||
},
|
||||
...options,
|
||||
|
||||
Reference in New Issue
Block a user