1 Commits
m2 ... release

Author SHA1 Message Date
Kar
ead0b8aeda Release 0.0.1 (PR #4) from master into release
Reviewed-on: #4
2025-03-20 15:27:05 +00:00

View File

@@ -187,45 +187,23 @@ export const DomainSetupForm = ({ defaultSubdomain }) => {
setValidationMessage('');
setShowDnsConfig(false);
fetch('/validate-domain', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
domain,
type: domainType
})
})
.then(response => {
if (!response.ok) {
throw new Error('Network response was not ok');
}
return response.json();
})
.then(data => {
const checkResult = data.status === "success";
console.log("finding:: checkResult:: ", checkResult, data);
// Simulate an API call to validate the domain
setTimeout(() => {
// Simulate a real domain check - in a real app this would be an API call
const checkResult = true; // Assume domain is valid for demo
setIsValidating(false);
setIsValidDomain(checkResult);
setIsValidating(false);
setIsValidDomain(checkResult);
if (checkResult) {
setValidationMessage('Domain is valid and registered.');
setShowDnsConfig(true);
} else {
setValidationMessage('Domain appears to be unregistered or unavailable.');
}
if (checkResult) {
setValidationMessage('Domain is valid and registered.');
setShowDnsConfig(true);
} else {
setValidationMessage('Domain appears to be unregistered or unavailable.');
}
validateForm();
})
.catch(error => {
console.error('Error validating domain:', error);
setIsValidating(false);
setIsValidDomain(false);
setValidationMessage('Error checking domain. Please try again.');
validateForm();
});
validateForm();
}, 1500);
};
// Check DNS configuration