mirror of
https://github.com/umami-software/umami.git
synced 2025-12-06 01:18:00 +01:00
10 lines
285 B
JavaScript
10 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;
|