mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 06:37:18 +01:00
New reports screens.
This commit is contained in:
parent
293e84acab
commit
2b13002f1b
9 changed files with 101 additions and 14 deletions
|
|
@ -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
10
hooks/useReports.js
Normal 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;
|
||||
Loading…
Add table
Add a link
Reference in a new issue