From e9ba0589962e80228f1b07ba766fd0751bcb85e0 Mon Sep 17 00:00:00 2001 From: Harshada Patil Date: Mon, 4 Aug 2025 22:21:51 +0530 Subject: [PATCH] Fix Scroll Position When Navigating to About or Contact Us Pages from Footer --- client/src/components/Footer.jsx | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/client/src/components/Footer.jsx b/client/src/components/Footer.jsx index dc4b0a8..8d582b3 100644 --- a/client/src/components/Footer.jsx +++ b/client/src/components/Footer.jsx @@ -1,30 +1,39 @@ import { Link } from "react-router-dom"; export default function Footer() { + // Function to scroll to top when navigating + const scrollToTop = () => { + window.scrollTo({ top: 0, behavior: 'smooth' }); + }; + return (