From 4326188be351da2d06326afa68970138bb7a0830 Mon Sep 17 00:00:00 2001 From: harshmishra19 Date: Tue, 14 May 2024 10:26:05 +0530 Subject: [PATCH] Added icons on the navbar --- src/components/Navbar.jsx | 60 ++++++++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 23 deletions(-) diff --git a/src/components/Navbar.jsx b/src/components/Navbar.jsx index 1bcf62f..2e9e19a 100644 --- a/src/components/Navbar.jsx +++ b/src/components/Navbar.jsx @@ -1,35 +1,49 @@ -import React from "react"; +import React, { useState } from "react"; import { NavLink, useLocation } from "react-router-dom"; const Navbar = () => { const location = useLocation(); + const [isOpen, setIsOpen] = useState(false); + + const toggleMenu = () => { + setIsOpen(!isOpen); + }; + + const closeMenu = () => { + setIsOpen(false); + }; const isActive = (path) => location.pathname === path ? 'text-[#00bfff] underline' : 'text-white'; return ( - ); }; -export default Navbar; + +export default Navbar; \ No newline at end of file