mirror of
https://github.com/kremalicious/umami.git
synced 2024-12-02 14:11:07 +01:00
11 lines
285 B
JavaScript
11 lines
285 B
JavaScript
import useApi from './useApi';
|
|
|
|
export function useReports(websiteId) {
|
|
const { get, useQuery } = useApi();
|
|
const { data, error, isLoading } = useQuery(['reports'], () => get(`/reports`, { websiteId }));
|
|
|
|
return { reports: data, error, isLoading };
|
|
}
|
|
|
|
export default useReports;
|