mirror of
https://github.com/BradNut/umami
synced 2025-09-08 17:40:29 +00:00
10 lines
261 B
JavaScript
10 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;
|