New reports screens.
This commit is contained in:
1 parent
293e84acab
commit
2b13002f1b
9 files changed
+101
-14
No files matched your search
@@ -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';
|
||||
|
||||
@@ -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;
|
||||
Reference in new issue
Block a user