2 Commits

Author SHA1 Message Date
2376eb5281 Update src/app/page.tsx 2026-04-15 05:43:07 +00:00
a1a648b518 Merge version_6 into main
Merge version_6 into main
2026-04-15 05:36:16 +00:00

View File

@@ -22,12 +22,19 @@ export default function LandingPage() {
const handleReserve = async () => { const handleReserve = async () => {
const message = encodeURIComponent(`Hello, I would like to book a table at Shaffa. \nName: ${name}\nEmail: ${email}\nMobile: ${mobile}\nGuests: ${guests}`); const message = encodeURIComponent(`Hello, I would like to book a table at Shaffa. \nName: ${name}\nEmail: ${email}\nMobile: ${mobile}\nGuests: ${guests}`);
// Send email via simple API request // Send email via API request
try { try {
await fetch('/api/send-booking', { const response = await fetch('/api/send-booking', {
method: 'POST', method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ name, email, mobile, guests, to: 'isittrueorjust@gmail.com' }), body: JSON.stringify({ name, email, mobile, guests, to: 'isittrueorjust@gmail.com' }),
}); });
if (!response.ok) {
console.error("Server error during booking submission");
}
} catch (e) { } catch (e) {
console.error("Failed to send email", e); console.error("Failed to send email", e);
} }
@@ -207,4 +214,4 @@ export default function LandingPage() {
</ReactLenis> </ReactLenis>
</ThemeProvider> </ThemeProvider>
); );
} }