diff --git a/src/app/page.tsx b/src/app/page.tsx index a05b82c..8c94b01 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -2,6 +2,7 @@ import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider"; import ReactLenis from "lenis/react"; +import { useState } from "react"; import AboutMetric from '@/components/sections/about/AboutMetric'; import ContactCenter from '@/components/sections/contact/ContactCenter'; import FaqSplitText from '@/components/sections/faq/FaqSplitText'; @@ -14,8 +15,13 @@ import TestimonialCardSix from '@/components/sections/testimonial/TestimonialCar import { Calendar, Clock, Smile, Star, UserPlus, Users } from "lucide-react"; export default function LandingPage() { - const handleAppointmentClick = () => { - window.location.href = "sms:4808933256"; + const [showAppointmentModal, setShowAppointmentModal] = useState(false); + const [formData, setFormData] = useState({ service: "", time: "" }); + + const handleSendAppointment = () => { + const message = `Appointment Request: ${formData.service} at ${formData.time}`; + window.location.href = `sms:4808933256?body=${encodeURIComponent(message)}`; + setShowAppointmentModal(false); }; return ( @@ -51,7 +57,7 @@ export default function LandingPage() { logoText="Ahwatukee Barbers" description="Family-run, friendly neighborhood barbershop in Phoenix, AZ. Quality cuts, classic shaves, and grooming for all ages." buttons={[ - { text: "Book Appointment", onClick: handleAppointmentClick }, + { text: "Book Appointment", onClick: () => setShowAppointmentModal(true) }, { text: "Get Directions", href: "https://maps.google.com" }, ]} imageSrc="http://img.b2bpic.net/free-photo/high-angle-cane-antique-store_23-2149640760.jpg" @@ -59,6 +65,25 @@ export default function LandingPage() { /> + {showAppointmentModal && ( +
+
+

Select Appointment

+ + setFormData({...formData, time: e.target.value})} /> +
+ + +
+
+
+ )} +