mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-27 04:45:54 +01:00
11 lines
254 B
JavaScript
11 lines
254 B
JavaScript
import useApi from './useApi';
|
|
|
|
export function useWebsite(websiteId) {
|
|
const { get, useQuery } = useApi();
|
|
return useQuery(['websites', websiteId], () => get(`/websites/${websiteId}`), {
|
|
enabled: !!websiteId,
|
|
});
|
|
}
|
|
|
|
export default useWebsite;
|