Compare commits

...

5 Commits
main ... m2

Author SHA1 Message Date
Kar 55c7a2097f revert b58068d108
revert refactored get started flow & code
2025-03-29 11:08:07 +00:00
Kar 4b6e4af86d Merge pull request 'refactored get started flow & code' (#18) from get-started-refactor into master
Reviewed-on: #18
2025-03-29 10:45:05 +00:00
Arkadyuti Sarkar b58068d108 refactored get started flow & code 2025-03-29 16:08:07 +05:30
Arkadyuti Sarkar f9d1556ce9 added api 2025-03-28 16:48:41 +05:30
Kar 0900d51954 Merge pull request 'pull footer improvement to the stage' (#3) from staging into master
Reviewed-on: #3
2025-03-20 15:25:07 +00:00
1 changed files with 36 additions and 14 deletions

View File

@ -187,23 +187,45 @@ export const DomainSetupForm = ({ defaultSubdomain }) => {
setValidationMessage('');
setShowDnsConfig(false);
// 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
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);
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();
}, 1500);
validateForm();
})
.catch(error => {
console.error('Error validating domain:', error);
setIsValidating(false);
setIsValidDomain(false);
setValidationMessage('Error checking domain. Please try again.');
validateForm();
});
};
// Check DNS configuration