fix(web): gate zone-records fetch to no-template case; wait for domains load before branching
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -130,12 +130,12 @@ export function useCheckDomain(id: string, enabled = true) {
|
||||
enabled: !!project && !!id && enabled,
|
||||
})
|
||||
}
|
||||
export function useZoneRecords(id: string) {
|
||||
export function useZoneRecords(id: string, enabled = true) {
|
||||
const { project } = useAuth()
|
||||
return useQuery({
|
||||
queryKey: ["zoneRecords", project?.id, id],
|
||||
queryFn: () => api.zoneRecords(project!.id, id),
|
||||
enabled: !!project && !!id,
|
||||
enabled: !!project && !!id && enabled,
|
||||
})
|
||||
}
|
||||
export function useCreateTemplateFromZone() {
|
||||
|
||||
Reference in New Issue
Block a user