From 50bca1a5de297c3fa38d54d0aa332dfa40dde83b Mon Sep 17 00:00:00 2001 From: akashluca-l Date: Sat, 19 Jul 2025 17:48:03 +0530 Subject: [PATCH] Hole website corrections updated --- app/blog/[slug]/page.js | 2 +- app/contact/page.js | 312 ++++++------ app/globals.css | 56 ++ app/page.js | 176 +++---- components/AboutUs.js | 65 +-- components/RestaurantMenu.js | 9 +- components/TestimonialAbout.js | 2 +- layout/Footer.js | 14 +- layout/Header.js | 4 +- package-lock.json | 316 ++++++++++++ package.json | 2 + public/assets/css/style.css | 46 +- public/assets/images/blog/blog-1.webp | Bin 0 -> 22238 bytes public/assets/images/blog/blog-2.webp | Bin 0 -> 23292 bytes public/assets/images/blog/blog-3.webp | Bin 0 -> 26966 bytes public/assets/images/blog/blog-large-1.webp | Bin 0 -> 169526 bytes public/assets/images/blog/blog-large-2.webp | Bin 0 -> 179150 bytes public/assets/images/blog/blog-large-3.webp | Bin 0 -> 180444 bytes utility/constant.utils.js | 534 +++++++++++--------- utility/sliderProps.js | 2 +- 20 files changed, 976 insertions(+), 564 deletions(-) create mode 100644 public/assets/images/blog/blog-1.webp create mode 100644 public/assets/images/blog/blog-2.webp create mode 100644 public/assets/images/blog/blog-3.webp create mode 100644 public/assets/images/blog/blog-large-1.webp create mode 100644 public/assets/images/blog/blog-large-2.webp create mode 100644 public/assets/images/blog/blog-large-3.webp diff --git a/app/blog/[slug]/page.js b/app/blog/[slug]/page.js index 738a011..4e2ae84 100644 --- a/app/blog/[slug]/page.js +++ b/app/blog/[slug]/page.js @@ -33,7 +33,7 @@ export default function BlogPage({ params }) { data-aos-duration={1500} data-aos-offset={50} > - Blog Standard + Blog Standard
{ +import React, { useState, useEffect } from 'react'; +import WellFoodLayout from "@/layout/WellFoodLayout"; +import PageBanner from "@/components/PageBanner"; +import ReCAPTCHA from 'react-google-recaptcha'; +import axios from 'axios'; + +export default function ContactPage() { + const [formData, setFormData] = useState({ + name: '', + email: '', + phone: '', + subject: '', + message: '', + }); + + const [captchaToken, setCaptchaToken] = useState(null); + const [formErrors, setFormErrors] = useState({}); + const [alert, setAlert] = useState({ show: false, type: '', message: '' }); + + const handleChange = (e) => { + const { name, value } = e.target; + setFormData(prev => ({ ...prev, [name]: value })); + }; + + const handleCaptchaChange = (token) => { + setCaptchaToken(token); + }; + + const handleSubmit = async (e) => { + e.preventDefault(); + const errors = {}; + + if (!formData.name.trim()) errors.name = 'Name is required.'; + if (!formData.email.trim()) errors.email = 'Email is required.'; + if (!formData.phone.trim()) errors.phone = 'Phone is required.'; + if (!formData.subject.trim()) errors.subject = 'Subject is required.'; + if (!formData.message.trim()) errors.message = 'Message is required.'; + if (!captchaToken) errors.captcha = 'Please verify the CAPTCHA.'; + + setFormErrors(errors); + + if (Object.keys(errors).length > 0) return; + + const payload = { + ...formData, + to: 'info@shivasdosa.com', + senderName: 'Shiva’s Dosa Contact Form', + recaptchaToken: captchaToken, + }; + + try { + const res = await axios.post('https://mailserver.metatronnest.com/send', payload, { + headers: { 'Content-Type': 'application/json' }, + }); + + setAlert({ show: true, type: 'success', message: res.data.message || 'Message sent successfully!' }); + setFormData({ name: '', email: '', phone: '', subject: '', message: '' }); + setCaptchaToken(null); + } catch (error) { + console.error('API Error:', error); + setAlert({ show: true, type: 'danger', message: 'Something went wrong. Try again later.' }); + } + }; + + useEffect(() => { + if (alert.show) { + const timer = setTimeout(() => setAlert({ show: false, type: '', message: '' }), 5000); + return () => clearTimeout(timer); + } + }, [alert]); return ( - -
+ +
-
+
- contact us -

Get In Touch

+ Contact Us +

Get In Touch

-
+
-
- -
+
- Location: -

- 1187 Fischer Hallman Rd, Unit 430, Kitchner, Ontario N2E 4H9. -

+ Location: +

1187 Fischer Hallman Rd, Unit 430, Kitchner, Ontario N2E 4H9.

-
- -
+
- Email Address -

- - info@shivasdosa.com - - {/*
{" "} - finslaninfo.com */} -

+ Email Address +

info@shivasdosa.com

-
- -
+
- Phone No -

- (519) 744-1444 - {/*
{" "} - +000 (456) 859 99 */} -

+ Phone No +

(519) 744-1444

-
+ +

Send Us Message

-

- Comments, Questions or any feedback will be pleased to hear from you. Please leave us the message in this contact form or Call us. -

-
-
-
+

Comments, Questions or any feedback? Leave us a message or call us.

+ + {alert.show && ( +
{alert.message}
+ )} + + + {['name', 'email', 'phone', 'subject'].map((field, i) => ( +
-
+ {formErrors[field] && ( +
{formErrors[field]}
+ )}
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
-