mirror of
https://github.com/umami-software/umami.git
synced 2026-02-06 13:47:15 +01: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;
|