diff --git a/src/app/page.tsx b/src/app/page.tsx index 7586575..5b6a2c4 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -10,8 +10,19 @@ import NavbarStyleCentered from '@/components/navbar/NavbarStyleCentered/NavbarS import ProductCardFour from '@/components/sections/product/ProductCardFour'; import SplitAbout from '@/components/sections/about/SplitAbout'; import TestimonialCardFive from '@/components/sections/testimonial/TestimonialCardFive'; +import { useState } from 'react'; export default function LandingPage() { + const [isReserving, setIsReserving] = useState(false); + const [email, setEmail] = useState(""); + const [mobile, setMobile] = useState(""); + + const handleReserve = () => { + const message = encodeURIComponent(`Hello, I would like to book a table. Email: ${email}, Mobile: ${mobile}`); + window.open(`https://wa.me/91XXXXXXXXXX?text=${message}`, '_blank'); + setIsReserving(false); + }; + return ( setIsReserving(true) }} brandName="Shaffa" /> @@ -60,8 +58,7 @@ export default function LandingPage() { description="Authentic flavors of North India, crafted for families and couples in the heart of Sec 26B, Chandigarh." buttons={[ { - text: "Reserve on WhatsApp", - href: "https://wa.me/91XXXXXXXXXX", + text: "Reserve on WhatsApp", onClick: () => setIsReserving(true), }, ]} imageSrc="http://img.b2bpic.net/free-photo/vegetable-salad-with-herbs-cheese_140725-44342.jpg?_wi=1" @@ -69,6 +66,30 @@ export default function LandingPage() { /> + {isReserving && ( +
+
+

Reserve a Table

+ setEmail(e.target.value)} + /> + setMobile(e.target.value)} + /> +
+ + +
+
+
+ )} + @@ -261,49 +173,13 @@ export default function LandingPage() { imageSrc="http://img.b2bpic.net/free-photo/top-view-indian-food-frame-with-copy-space_23-2148747627.jpg" logoText="Shaffa" columns={[ - { - title: "Shaffa", - items: [ - { - label: "About", - href: "#about", - }, - { - label: "Menu", - href: "#menu", - }, - ], - }, - { - title: "Reservation", - items: [ - { - label: "WhatsApp Booking", - href: "https://wa.me/91XXXXXXXXXX", - }, - { - label: "Directions", - href: "https://maps.google.com", - }, - ], - }, - { - title: "Contact", - items: [ - { - label: "Sec 26B, Chandigarh", - href: "#", - }, - { - label: "+91-XXXXXXXXXX", - href: "tel:+91XXXXXXXXXX", - }, - ], - }, + { title: "Shaffa", items: [{ label: "About", href: "#about" }, { label: "Menu", href: "#menu" }] }, + { title: "Reservation", items: [{ label: "WhatsApp Booking", onClick: () => setIsReserving(true), href: "#" }, { label: "Directions", href: "https://maps.google.com" }] }, + { title: "Contact", items: [{ label: "Sec 26B, Chandigarh", href: "#" }, { label: "+91-XXXXXXXXXX", href: "tel:+91XXXXXXXXXX" }] }, ]} />
); -} +} \ No newline at end of file