mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-23 18:41:36 +01:00
11 lines
261 B
JavaScript
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;
|