umami/hooks/useReports.js

11 lines
261 B
JavaScript
Raw Normal View History

2023-06-15 12:27:41 +02:00
import useApi from './useApi';
export function useReports() {
const { get, useQuery } = useApi();
const { data, error, isLoading } = useQuery(['reports'], () => get(`/reports`));
return { reports: data, error, isLoading };
}
export default useReports;