diff --git a/frontend/src/components/Shared/Navbar.jsx b/frontend/src/components/Shared/Navbar.jsx index 92cd0d93..073f390f 100644 --- a/frontend/src/components/Shared/Navbar.jsx +++ b/frontend/src/components/Shared/Navbar.jsx @@ -4,6 +4,7 @@ import { Link, useLocation, useNavigate } from "react-router-dom"; const Navbar = () => { const [isloggedIn, setisloggedIn] = useState(false); + const [isModalOpen, setIsModalOpen] = useState(false); const [isScrolled, setIsScrolled] = useState(false); const [isMenuOpen, setIsMenuOpen] = useState(false); const location = useLocation(); @@ -34,6 +35,11 @@ const Navbar = () => { setIsMenuOpen(!isMenuOpen); }; + const handleLogout = () => { + setisloggedIn(false); // Set isLoggedIn to false on confirmation + setIsModalOpen(false); // Close the modal + }; + const isHomePage = location.pathname === "/"; let buttonTextClass; if (isScrolled) { @@ -54,11 +60,8 @@ const Navbar = () => { return ( ); };