From 6907bf2852d58203f6073cbac3df85154d3b0f28 Mon Sep 17 00:00:00 2001 From: Suvodip Date: Fri, 21 Mar 2025 18:08:06 +0530 Subject: [PATCH] s11 --- src/components/DomainSetupForm.jsx | 175 ++++++++++++++++++----------- src/pages/contact.astro | 2 +- 2 files changed, 108 insertions(+), 69 deletions(-) diff --git a/src/components/DomainSetupForm.jsx b/src/components/DomainSetupForm.jsx index 4632a98..f3a0b28 100644 --- a/src/components/DomainSetupForm.jsx +++ b/src/components/DomainSetupForm.jsx @@ -30,7 +30,8 @@ export const DomainSetupForm = ({ defaultSubdomain }) => { const [dnsVerified, setDnsVerified] = useState({ cname: false, ns: false, - a: false + a: false, + ip: false }); // Form validation @@ -61,7 +62,7 @@ export const DomainSetupForm = ({ defaultSubdomain }) => { } validateForm(); - }, [useCustomDomain, dnsVerified.cname, dnsVerified.ns, domainType, dnsMethod]); + }, [useCustomDomain, dnsVerified.cname, dnsVerified.ns, dnsVerified.ns, domainType, dnsMethod]); // Show toast notification const showToast = (message) => { @@ -110,7 +111,8 @@ export const DomainSetupForm = ({ defaultSubdomain }) => { setDnsVerified({ cname: false, ns: false, - a: false + a: false, + ip: false }); } else { // Force SiliconPin subdomain to be checked if custom domain is checked @@ -246,6 +248,10 @@ export const DomainSetupForm = ({ defaultSubdomain }) => { setFormValid(false); return; } + if (dnsMethod === 'ip' && !dnsVerified.ip) { + setFormValid(false); + return; + } } setFormValid(true); @@ -261,20 +267,7 @@ export const DomainSetupForm = ({ defaultSubdomain }) => { } // In a real app, this would submit the form data to the server - console.log({ - deploymentType, - appType, - sampleWebAppType, - sourceType, - repoUrl, - deploymentKey, - useSubdomain, - useCustomDomain, - customDomain, - customSubdomain, - domainType, - dnsMethod - }); + console.log([{ deploymentType, appType, sampleWebAppType, sourceType, repoUrl, deploymentKey, useSubdomain, useCustomDomain, customDomain, customSubdomain, domainType, dnsMethod}]); showToast('Form submitted successfully!'); }; @@ -550,9 +543,10 @@ export const DomainSetupForm = ({ defaultSubdomain }) => { {/* Domain Validation */} @@ -582,7 +576,7 @@ export const DomainSetupForm = ({ defaultSubdomain }) => { {/* CNAME Record Option */}
-
+
- + {/* Nameserver Option (only for full domains, not subdomains) */} {domainType === 'domain' && ( -
-
- -
- -

Update your domain's nameservers to use ours

+ <> +
+
)} @@ -692,7 +733,6 @@ export const DomainSetupForm = ({ defaultSubdomain }) => {
- {/* Form Submit Button */} - ); diff --git a/src/pages/contact.astro b/src/pages/contact.astro index 5753abe..39caf9a 100644 --- a/src/pages/contact.astro +++ b/src/pages/contact.astro @@ -133,7 +133,7 @@ const contactSchema = { Sunday: Closed -
+
Technical Support: 24/7