Updates to team components.

This commit is contained in:
Mike Cao
2024-02-04 18:03:26 -08:00
parent 102f5b78b1
commit dbb3801e66
28 changed files with 173 additions and 159 deletions

View File

@@ -3,8 +3,9 @@ import useApi from './useApi';
export function useWebsite(websiteId: string, options?: { [key: string]: any }) {
const { get, useQuery } = useApi();
return useQuery({
queryKey: ['websites', websiteId],
queryKey: ['websites', { websiteId }],
queryFn: () => get(`/websites/${websiteId}`),
enabled: !!websiteId,
...options,