From 7be42b8d45d20654a5067594edd3f9fd072238d0 Mon Sep 17 00:00:00 2001 From: Vidhi Jindal Date: Fri, 25 Oct 2024 18:44:06 +0530 Subject: [PATCH 1/4] made the navbar sticky --- frontend/src/Components/Navbar.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/Components/Navbar.jsx b/frontend/src/Components/Navbar.jsx index 3ae21844..a5bf7ebc 100644 --- a/frontend/src/Components/Navbar.jsx +++ b/frontend/src/Components/Navbar.jsx @@ -46,7 +46,7 @@ const Navbar = () => { useEffect(() => { const handleScroll = () => { - if (window.scrollY > window.innerHeight) { + if (window.scrollY > window.innerHeight) { // After 100vh setIsSticky(true); } else { setIsSticky(false); From ae9facc14167700a7a1351bc5deb1173656e853f Mon Sep 17 00:00:00 2001 From: Vidhi Jindal Date: Fri, 25 Oct 2024 18:46:21 +0530 Subject: [PATCH 2/4] made the navbar sticky --- frontend/src/Components/Navbar.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/Components/Navbar.jsx b/frontend/src/Components/Navbar.jsx index a5bf7ebc..e7bb0b4d 100644 --- a/frontend/src/Components/Navbar.jsx +++ b/frontend/src/Components/Navbar.jsx @@ -1,3 +1,4 @@ + import React, { useEffect, useState } from "react"; import { Link, NavLink, useLocation, useNavigate } from "react-router-dom"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; @@ -286,4 +287,4 @@ const Navbar = () => { ); }; -export default Navbar; +export default Navbar; \ No newline at end of file From 9bde2c7b9d6c4444403274651b79f081e060a8e6 Mon Sep 17 00:00:00 2001 From: Vidhi Jindal Date: Fri, 25 Oct 2024 19:00:03 +0530 Subject: [PATCH 3/4] . --- frontend/index.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/index.html b/frontend/index.html index dd1396cc..79a33d0e 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -8,8 +8,9 @@ - - + + + From 2f8a3174b0f4a75d9a5067bb895da15a1f85b7e9 Mon Sep 17 00:00:00 2001 From: Vidhi Jindal Date: Fri, 25 Oct 2024 19:04:16 +0530 Subject: [PATCH 4/4] . --- frontend/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/index.html b/frontend/index.html index 79a33d0e..18c9c325 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -8,8 +8,8 @@ - - + +