From 3b7c489ad9be06c9a7b77846ca2936801a613295 Mon Sep 17 00:00:00 2001 From: saakshii123 Date: Mon, 20 May 2024 13:16:49 +0530 Subject: [PATCH] Added scrolltotop in about and contact now clicking about and contact us in footer scrolls it to top. --- src/Components/Footer/Footer.jsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Components/Footer/Footer.jsx b/src/Components/Footer/Footer.jsx index 75f8338..5c71732 100644 --- a/src/Components/Footer/Footer.jsx +++ b/src/Components/Footer/Footer.jsx @@ -7,6 +7,10 @@ import whatsapp_icon from "../Assets/whatsapp_icon.png"; import { Link } from "react-router-dom"; import { ShopContext } from "../../Context/ShopContext"; +const scrollToTop = () => { + window.scrollTo({ top: 0, behavior: 'smooth' }); +}; + const Footer = () => { const { theme } = useContext(ShopContext); return ( @@ -21,13 +25,13 @@ const Footer = () => {
  • Offices
  • {" "} - + About
  • {" "} - + Contact Us