mirror of
https://github.com/kremalicious/umami.git
synced 2024-06-25 02:36:25 +02:00
11 lines
262 B
TypeScript
11 lines
262 B
TypeScript
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;
|