Metrics components refactoring. New event data page.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import useApi from './useApi';
|
||||
|
||||
export function useReports() {
|
||||
export function useReports(websiteId) {
|
||||
const { get, useQuery } = useApi();
|
||||
const { data, error, isLoading } = useQuery(['reports'], () => get(`/reports`));
|
||||
const { data, error, isLoading } = useQuery(['reports'], () => get(`/reports`, { websiteId }));
|
||||
|
||||
return { reports: data, error, isLoading };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user