mirror of
https://github.com/BradNut/umami
synced 2025-09-08 17:40:29 +00:00
12 lines
289 B
TypeScript
12 lines
289 B
TypeScript
import useApi from './useApi';
|
|
|
|
export function useWebsite(websiteId: string) {
|
|
const { get, useQuery } = useApi();
|
|
return useQuery({
|
|
queryKey: ['websites', websiteId],
|
|
queryFn: () => get(`/websites/${websiteId}`),
|
|
enabled: !!websiteId,
|
|
});
|
|
}
|
|
|
|
export default useWebsite;
|