Renamed id routes for API.
This commit is contained in:
1 parent
53a991176b
commit
4429198397
42 files changed
+154
-170
No files matched your search
File renamed without changes.
@@ -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