DNS Provider configuration

This commit is contained in:
Jamie Curnow
2025-09-22 22:19:18 +10:00
parent 54e036276a
commit 94375bbc5f
13 changed files with 387 additions and 42 deletions

View File

@@ -0,0 +1,17 @@
import { useQuery } from "@tanstack/react-query";
import { type DNSProvider, getCertificateDNSProviders } from "src/api/backend";
const fetchDnsProviders = () => {
return getCertificateDNSProviders();
};
const useDnsProviders = (options = {}) => {
return useQuery<DNSProvider[], Error>({
queryKey: ["dns-providers"],
queryFn: () => fetchDnsProviders(),
staleTime: 300 * 1000,
...options,
});
};
export { fetchDnsProviders, useDnsProviders };