From 60780385a2bf82e9dfc823dbbe68092663b73911 Mon Sep 17 00:00:00 2001 From: Bruno Pavelja Date: Sat, 25 Apr 2026 14:46:13 +0200 Subject: [PATCH] feat(web): add module links and rename nav items - Add module tabs: Web Scan, SEO Crawler with active state detection - Remove separate History link from top nav (history belongs in modules) - Remove unused Clock and Search icon imports --- packages/web/src/components/layout/Nav.tsx | 57 ++++++++++++++++------ 1 file changed, 43 insertions(+), 14 deletions(-) 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 (