Compare commits
18 Commits
version_8
...
version_11
| Author | SHA1 | Date | |
|---|---|---|---|
| 2748042244 | |||
| 415ae80e65 | |||
| 80e3526461 | |||
| 099c71c5b3 | |||
| a568bb5127 | |||
| b8f1829054 | |||
| c65ad8518a | |||
| 0ea23c540d | |||
| 477951406e | |||
| 2f3838a075 | |||
| 7f881aa9f8 | |||
| f0ccf48d0f | |||
| 7f9538ca07 | |||
| ca7881078e | |||
| c7d6600b7c | |||
| 90d60d706e | |||
| 225326d9fd | |||
| e1b2d7f3bb |
@@ -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);
|
||||
}
|
||||
@@ -68,7 +83,6 @@ export default function AssessmentPage() {
|
||||
<NavbarStyleCentered
|
||||
brandName="Land Care 4 U"
|
||||
navItems={[
|
||||
{ name: "Home", id: "home" },
|
||||
{ name: "Our Work", id: "showcase" },
|
||||
{ name: "About", id: "about" },
|
||||
{ name: "Reviews", id: "testimonials" }
|
||||
@@ -214,4 +228,4 @@ export default function AssessmentPage() {
|
||||
</div>
|
||||
</ThemeProvider>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,8 +48,7 @@ export default function LandingPage() {
|
||||
logoText="Land Care 4 U & Landscaping"
|
||||
description="Transform Your Yard Into a Beautiful, Stress-Free Outdoor Space. Reliable. Professional. Affordable landscaping trusted by homeowners who want it done right the first time."
|
||||
buttons={[
|
||||
{ text: "Get Your Free Yard Assessment", onClick: handleGetAssessment },
|
||||
{ text: "View Our Work", href: "#showcase" }
|
||||
{ text: "Get Your Free Yard Assessment", onClick: handleGetAssessment }
|
||||
]}
|
||||
slides={[
|
||||
{ imageSrc: "http://img.b2bpic.net/free-photo/beautiful-modern-house-cement-view-from-garden_1127-3209.jpg?id=1242915", imageAlt: "Yard transformation from overgrown to lush green landscape" },
|
||||
|
||||
Reference in New Issue
Block a user