mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 06:37:18 +01:00
Typescript conversion.
This commit is contained in:
parent
366ef35d3d
commit
8775d696b8
29 changed files with 74 additions and 57 deletions
10
src/components/hooks/useWebsite.ts
Normal file
10
src/components/hooks/useWebsite.ts
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import useApi from './useApi';
|
||||
|
||||
export function useWebsite(websiteId: string) {
|
||||
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