diff --git a/packages/web/src/components/layout/Nav.tsx b/packages/web/src/components/layout/Nav.tsx index 23d61a9..9e50d88 100644 --- a/packages/web/src/components/layout/Nav.tsx +++ b/packages/web/src/components/layout/Nav.tsx @@ -1,6 +1,6 @@ import { useState, useRef, useEffect } from "react"; -import { Link } from "react-router-dom"; -import { Globe, Clock, Palette, Check, Settings } from "lucide-react"; +import { Link, useLocation } from "react-router-dom"; +import { Globe, Palette, Check, Settings } from "lucide-react"; import { useTheme } from "@/hooks/use-theme"; interface NavProps { @@ -12,6 +12,14 @@ export default function Nav({ userMenu }: NavProps = {}) { const [showThemes, setShowThemes] = useState(false); const { theme, setTheme, themes } = useTheme(); const dropdownRef = useRef(null); + const location = useLocation(); + + const seoActive = location.pathname.startsWith("/seo"); + const generalActive = + location.pathname.startsWith("/recon") + || location.pathname.startsWith("/results") + || location.pathname === "/history" + || location.pathname.startsWith("/history/"); // Close theme dropdown on click outside useEffect(() => { @@ -28,21 +36,27 @@ export default function Nav({ userMenu }: NavProps = {}) { return (