Update src/app/page.tsx
This commit is contained in:
@@ -19,14 +19,14 @@ export default function LandingPage() {
|
||||
const [submitting, setSubmitting] = useState(false);
|
||||
const [submitted, setSubmitted] = useState(false);
|
||||
|
||||
const handleQuoteSubmit = async (e: React.FormEvent) => {
|
||||
e.preventDefault();
|
||||
const handleQuoteSubmit = async () => {
|
||||
setSubmitting(true);
|
||||
|
||||
try {
|
||||
const response = await fetch("/api/quote", {
|
||||
method: "POST", headers: {
|
||||
"Content-Type": "application/json"},
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(formData),
|
||||
});
|
||||
|
||||
@@ -232,7 +232,7 @@ export default function LandingPage() {
|
||||
ctaTitle="Get Your Free Quote"
|
||||
ctaDescription="Contact M&B Complete Lawn Services today. Call us 24/7 or fill out our quick form."
|
||||
ctaButton={{
|
||||
text: "Submit Quote Request", onClick: () => handleQuoteSubmit({ preventDefault: () => {} } as React.FormEvent)
|
||||
text: "Submit Quote Request", onClick: handleQuoteSubmit
|
||||
}}
|
||||
ctaIcon={Phone}
|
||||
faqs={[
|
||||
|
||||
Reference in New Issue
Block a user