From d19e6967c92956e9f1a0cbab6d23d4be4a9d1e66 Mon Sep 17 00:00:00 2001 From: Amruta Kothawade Date: Thu, 6 Jun 2024 10:07:33 +0530 Subject: [PATCH] second --- src/components/Footer.jsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/Footer.jsx b/src/components/Footer.jsx index 653d4a3..a848353 100644 --- a/src/components/Footer.jsx +++ b/src/components/Footer.jsx @@ -1,6 +1,13 @@ import React from 'react'; +import { useNavigate } from 'react-router-dom'; const Footer = () => { + const navigate = useNavigate(); + + const handleNavigation = (path) => { + navigate(path); + window.scrollTo(0, 0); + }; return (
@@ -11,7 +18,7 @@ const Footer = () => {

Company

    -
  • About Us
  • +
  • handleNavigation('/about')}>About Us
  • News
  • Contact Us