From bfd607a9df375b91f3d4a3969cfe3edb2d495a71 Mon Sep 17 00:00:00 2001 From: Janvi Singh Date: Sun, 14 Sep 2025 11:34:38 +0530 Subject: [PATCH 1/2] =?UTF-8?q?=E2=9C=A8=20Enhance=20Navbar=20Styling=20wi?= =?UTF-8?q?th=20Better=20Headings=20and=20Hover=20Effects?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Navbar.tsx | 150 ++++++++++++++++++-------------------- 1 file changed, 69 insertions(+), 81 deletions(-) diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx index c6cc86d..ffcd4ff 100644 --- a/src/components/Navbar.tsx +++ b/src/components/Navbar.tsx @@ -1,62 +1,68 @@ -import { Link } from "react-router-dom"; +import { Link, useLocation } from "react-router-dom"; import { useState, useContext } from "react"; import { ThemeContext } from "../context/ThemeContext"; -import { Moon, Sun } from 'lucide-react'; - +import { Moon, Sun } from "lucide-react"; const Navbar: React.FC = () => { - const [isOpen, setIsOpen] = useState(false); const themeContext = useContext(ThemeContext); + const location = useLocation(); - if (!themeContext) - return null; + if (!themeContext) return null; const { toggleTheme, mode } = themeContext; + const navLinks = [ + { to: "/", label: "Home" }, + { to: "/track", label: "Tracker" }, + { to: "/contributors", label: "Contributors" }, + { to: "/login", label: "Login" }, + ]; + return ( -