mirror of
https://github.com/umami-software/umami.git
synced 2026-02-09 23:27:12 +01:00
Metrics components refactoring. New event data page.
This commit is contained in:
parent
4e6d24e932
commit
c865f43b11
47 changed files with 756 additions and 672 deletions
10
hooks/useWebsite.js
Normal file
10
hooks/useWebsite.js
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import useApi from './useApi';
|
||||
|
||||
export function useWebsite(websiteId) {
|
||||
const { get, useQuery } = useApi();
|
||||
return useQuery(['websites', websiteId], () => get(`/websites/${websiteId}`), {
|
||||
enabled: !!websiteId,
|
||||
});
|
||||
}
|
||||
|
||||
export default useWebsite;
|
||||
Loading…
Add table
Add a link
Reference in a new issue