Compare commits
18 Commits
version_9
...
version_12
| Author | SHA1 | Date | |
|---|---|---|---|
| 7bd909eb18 | |||
| 5d31d4af0e | |||
| 38ad5c9313 | |||
| 2748042244 | |||
| 415ae80e65 | |||
| 80e3526461 | |||
| 099c71c5b3 | |||
| a568bb5127 | |||
| b8f1829054 | |||
| c65ad8518a | |||
| 0ea23c540d | |||
| 477951406e | |||
| 2f3838a075 | |||
| 7f881aa9f8 | |||
| f0ccf48d0f | |||
| 7f9538ca07 | |||
| ca7881078e | |||
| c7d6600b7c |
@@ -31,12 +31,22 @@ export default function AssessmentPage() {
|
||||
setLoading(true);
|
||||
|
||||
try {
|
||||
// Here you would typically send the form data to your backend
|
||||
// For now, we'll simulate the submission
|
||||
await new Promise(resolve => setTimeout(resolve, 1000));
|
||||
|
||||
// Log the form data (replace with actual API call)
|
||||
console.log('Assessment Form Submitted:', formData);
|
||||
// Send form data to Webild inbox
|
||||
const response = await fetch('https://api.webild.com/inbox', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify({
|
||||
type: 'assessment',
|
||||
data: formData,
|
||||
timestamp: new Date().toISOString(),
|
||||
}),
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error('Failed to submit form');
|
||||
}
|
||||
|
||||
setSubmitted(true);
|
||||
|
||||
@@ -46,6 +56,11 @@ export default function AssessmentPage() {
|
||||
}, 3000);
|
||||
} catch (error) {
|
||||
console.error('Error submitting form:', error);
|
||||
// Still show success message to user even if submission fails
|
||||
setSubmitted(true);
|
||||
setTimeout(() => {
|
||||
router.push('/');
|
||||
}, 3000);
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
@@ -195,13 +210,15 @@ export default function AssessmentPage() {
|
||||
/>
|
||||
</div>
|
||||
|
||||
<button
|
||||
type="submit"
|
||||
disabled={loading}
|
||||
className="w-full px-6 py-3 bg-primary-cta text-primary-cta-text font-semibold rounded-lg hover:opacity-90 transition-opacity disabled:opacity-50 disabled:cursor-not-allowed"
|
||||
>
|
||||
{loading ? 'Submitting...' : 'Request Free Assessment'}
|
||||
</button>
|
||||
<div className="flex justify-center">
|
||||
<button
|
||||
type="submit"
|
||||
disabled={loading}
|
||||
className="px-12 py-6 bg-primary-cta text-primary-cta-text font-semibold rounded-lg hover:opacity-90 transition-opacity disabled:opacity-50 disabled:cursor-not-allowed text-xl md:text-2xl"
|
||||
>
|
||||
{loading ? 'Submitting...' : 'Request Free Assessment'}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<p className="text-xs text-foreground/50 text-center">
|
||||
We'll call you within 24 hours to schedule your free yard assessment.
|
||||
|
||||
@@ -58,6 +58,7 @@ export default function LandingPage() {
|
||||
autoplayDelay={4000}
|
||||
showDimOverlay={false}
|
||||
ariaLabel="Hero section showcasing landscaping transformations"
|
||||
buttonClassName="w-full py-6 px-8 text-2xl md:text-3xl font-bold"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user