fix: reject snapshot when template already attached (409); handle domains-load error; drop orphaned useDeleteDomain

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-05 12:54:52 +07:00
co-authored by Claude Opus 4.8
parent 137113cbe6
commit 9f0938daea
5 changed files with 80 additions and 17 deletions
-11
View File
@@ -111,17 +111,6 @@ export function useSetDomainTemplate() {
onSuccess: () => qc.invalidateQueries({ queryKey: ["domains", project?.id] }),
})
}
export function useDeleteDomain() {
const { project } = useAuth()
const qc = useQueryClient()
return useMutation({
mutationFn: (id: string) => {
const pid = requireProjectId(project)
return api.deleteDomain(pid, id)
},
onSuccess: () => qc.invalidateQueries({ queryKey: ["domains", project?.id] }),
})
}
export function useCheckDomain(id: string, enabled = true) {
const { project } = useAuth()
return useQuery({