diff --git a/src/app/page.tsx b/src/app/page.tsx index 2462606..b0b8999 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -13,6 +13,14 @@ import ProductCardOne from '@/components/sections/product/ProductCardOne'; import TestimonialCardFifteen from '@/components/sections/testimonial/TestimonialCardFifteen'; export default function LandingPage() { + const scrollToSection = (id: string) => { + const sectionId = id.startsWith('#') ? id : `#${id}`; + const element = document.querySelector(sectionId); + if (element) { + element.scrollIntoView({ behavior: 'smooth' }); + } + }; + return ( scrollToSection("menu") }} /> @@ -45,7 +53,7 @@ export default function LandingPage() { scrollToSection("menu") }]} slides={[ { imageSrc: "http://img.b2bpic.net/free-photo/smoked-pork-leg-served-restaurant-food-tasty-hunger-eating-concept_7502-5465.jpg", imageAlt: "Traditional Lamb Roast" }, { imageSrc: "http://img.b2bpic.net/free-photo/tava-kebab-barbeque-pottery-pan_114579-2183.jpg", imageAlt: "Shinwari Karahi" },