Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 73600ac83b | |||
| eab1faa6f3 | |||
| bec4b93fdd | |||
| 7c4ccb073a |
@@ -16,10 +16,12 @@ export default function LandingPage() {
|
||||
const [isReserving, setIsReserving] = useState(false);
|
||||
const [email, setEmail] = useState("");
|
||||
const [mobile, setMobile] = useState("");
|
||||
const [name, setName] = useState("");
|
||||
const [guests, setGuests] = useState("2");
|
||||
|
||||
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');
|
||||
const message = encodeURIComponent(`Hello, I would like to book a table at Shaffa. \nName: ${name}\nEmail: ${email}\nMobile: ${mobile}\nGuests: ${guests}`);
|
||||
window.open(`https://wa.me/919876543210?text=${message}`, '_blank');
|
||||
setIsReserving(false);
|
||||
};
|
||||
|
||||
@@ -46,7 +48,7 @@ export default function LandingPage() {
|
||||
{ name: "Contact", id: "contact" },
|
||||
]}
|
||||
button={{
|
||||
text: "Reserve", onClick: () => setIsReserving(true)
|
||||
text: "Book a table", onClick: () => setIsReserving(true)
|
||||
}}
|
||||
brandName="Shaffa"
|
||||
/>
|
||||
@@ -58,7 +60,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", onClick: () => setIsReserving(true),
|
||||
text: "Book a table", onClick: () => setIsReserving(true),
|
||||
},
|
||||
]}
|
||||
imageSrc="http://img.b2bpic.net/free-photo/vegetable-salad-with-herbs-cheese_140725-44342.jpg?_wi=1"
|
||||
@@ -69,7 +71,13 @@ export default function LandingPage() {
|
||||
{isReserving && (
|
||||
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4">
|
||||
<div className="bg-white p-8 rounded-lg shadow-xl w-full max-w-sm">
|
||||
<h2 className="text-xl font-bold mb-4 text-black">Reserve a Table</h2>
|
||||
<h2 className="text-xl font-bold mb-4 text-black">Book a Table</h2>
|
||||
<input
|
||||
type="text"
|
||||
placeholder="Full Name"
|
||||
className="w-full p-2 mb-4 border rounded text-black"
|
||||
onChange={(e) => setName(e.target.value)}
|
||||
/>
|
||||
<input
|
||||
type="email"
|
||||
placeholder="Email Address"
|
||||
@@ -83,8 +91,8 @@ export default function LandingPage() {
|
||||
onChange={(e) => setMobile(e.target.value)}
|
||||
/>
|
||||
<div className="flex gap-2">
|
||||
<button onClick={() => setIsReserving(false)} className="flex-1 p-2 bg-gray-200 rounded">Cancel</button>
|
||||
<button onClick={handleReserve} className="flex-1 p-2 bg-blue-600 text-white rounded">Complete Booking</button>
|
||||
<button onClick={() => setIsReserving(false)} className="flex-1 p-2 bg-gray-200 rounded text-black">Cancel</button>
|
||||
<button onClick={handleReserve} className="flex-1 p-2 bg-blue-600 text-white rounded">Confirm Reservation</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -96,6 +104,9 @@ export default function LandingPage() {
|
||||
textboxLayout="default"
|
||||
gridVariant="three-columns-all-equal-width"
|
||||
useInvertedBackground={false}
|
||||
buttons={[
|
||||
{ text: "Reserve on WhatsApp", onClick: () => setIsReserving(true) }
|
||||
]}
|
||||
products={[
|
||||
{ id: "m1", name: "Butter Chicken", price: "₹450", variant: "Popular", imageSrc: "http://img.b2bpic.net/free-photo/top-close-view-delicious-bright-cake-with-cream-cracker-cookies-dark-wall-cake-biscuit-pie-sugar-sweet-photo-cookie_140725-53987.jpg?_wi=1" },
|
||||
{ id: "m2", name: "Tandoori Platter", price: "₹650", variant: "Premium", imageSrc: "http://img.b2bpic.net/free-photo/top-view-assortment-different-pakistan-goodies_23-2148821568.jpg?_wi=1" },
|
||||
@@ -175,7 +186,7 @@ export default function LandingPage() {
|
||||
columns={[
|
||||
{ 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" }] },
|
||||
{ title: "Contact", items: [{ label: "Sec 26B, Chandigarh", href: "#" }, { label: "+91-9876543210", href: "tel:+919876543210" }] },
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user