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 ( -