New reports screens.

This commit is contained in:
Mike Cao 2023-06-15 03:27:41 -07:00
parent 293e84acab
commit 2b13002f1b
9 changed files with 101 additions and 14 deletions

View file

@ -10,6 +10,7 @@ export * from './useLocale';
export * from './useMessages';
export * from './usePageQuery';
export * from './useReport';
export * from './useReports';
export * from './useRequireLogin';
export * from './useShareToken';
export * from './useSticky';

10
hooks/useReports.js Normal file
View file

@ -0,0 +1,10 @@
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;