Moved code into src folder. Added build for component library.
This commit is contained in:
10
src/components/hooks/useWebsite.js
Normal file
10
src/components/hooks/useWebsite.js
Normal file
@@ -0,0 +1,10 @@
|
||||
import useApi from './useApi';
|
||||
|
||||
export function useWebsite(websiteId) {
|
||||
const { get, useQuery } = useApi();
|
||||
return useQuery(['websites', websiteId], () => get(`/websites/${websiteId}`), {
|
||||
enabled: !!websiteId,
|
||||
});
|
||||
}
|
||||
|
||||
export default useWebsite;
|
||||
Reference in New Issue
Block a user