umami/hooks/useReports.js
2023-06-15 03:27:41 -07:00

11 lines
261 B
JavaScript

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;