Updated query hooks for teams and websites.
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
import useApi from './useApi';
|
||||
|
||||
export function useWebsite(websiteId: string) {
|
||||
export function useWebsite(websiteId: string, options?: { [key: string]: any }) {
|
||||
const { get, useQuery } = useApi();
|
||||
return useQuery({
|
||||
queryKey: ['websites', websiteId],
|
||||
queryFn: () => get(`/websites/${websiteId}`),
|
||||
enabled: !!websiteId,
|
||||
...options,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user