From 3b5ab43d0621e8fda8885a68a442096f4415ac96 Mon Sep 17 00:00:00 2001 From: bender Date: Tue, 17 Mar 2026 23:22:43 +0000 Subject: [PATCH] Update src/app/page.tsx --- src/app/page.tsx | 107 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 103 insertions(+), 4 deletions(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index 8b785ce..664da14 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -11,8 +11,29 @@ import FaqSplitText from "@/components/sections/faq/FaqSplitText"; import ContactCenter from "@/components/sections/contact/ContactCenter"; import FooterBaseReveal from "@/components/sections/footer/FooterBaseReveal"; import { Award, CheckCircle, Cog, Droplets, Gauge, Phone, Rotate3D, Shield, TrendingUp, Wrench, Zap } from "lucide-react"; +import { useState } from "react"; export default function LandingPage() { + const [isModalOpen, setIsModalOpen] = useState(false); + const [phoneNumber, setPhoneNumber] = useState(""); + const [serviceDescription, setServiceDescription] = useState(""); + + const handleOpenModal = () => { + setIsModalOpen(true); + }; + + const handleCloseModal = () => { + setIsModalOpen(false); + setPhoneNumber(""); + setServiceDescription(""); + }; + + const handleSubmit = (e: React.FormEvent) => { + e.preventDefault(); + console.log("Form submitted:", { phoneNumber, serviceDescription }); + handleCloseModal(); + }; + return ( @@ -50,7 +71,7 @@ export default function LandingPage() { tagAnimation="slide-up" background={{ variant: "radial-gradient" }} buttons={[ - { text: "Book Service Now", href: "#contact" }, + { text: "Book Service Now", onClick: handleOpenModal }, { text: "Learn More", href: "#services" } ]} buttonAnimation="slide-up" @@ -115,7 +136,7 @@ export default function LandingPage() { animationType="slide-up" textboxLayout="default" useInvertedBackground={false} - buttons={[{ text: "Schedule Your Service", href: "#contact" }]} + buttons={[{ text: "Schedule Your Service", onClick: handleOpenModal }]} buttonAnimation="slide-up" /> @@ -186,7 +207,7 @@ export default function LandingPage() { + + {/* Service Booking Modal */} + {isModalOpen && ( +
+
e.stopPropagation()} + > +
+

Book Service

+ +
+ +
+
+ + setPhoneNumber(e.target.value)} + required + className="w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-primary-cta text-foreground" + /> +
+ +
+ +