From 49f97a9939d955a64dbd670434e07eca524679d8 Mon Sep 17 00:00:00 2001 From: RKWojs Date: Fri, 12 Sep 2025 12:03:07 +0200 Subject: [PATCH] feat: Enhance navigation component with mobile menu support and improved styling --- src/components/ui/Navigation.js | 154 ++++++++++++++++++++++++-------- 1 file changed, 116 insertions(+), 38 deletions(-) diff --git a/src/components/ui/Navigation.js b/src/components/ui/Navigation.js index 58776fc..550cc01 100644 --- a/src/components/ui/Navigation.js +++ b/src/components/ui/Navigation.js @@ -5,17 +5,17 @@ import { usePathname } from "next/navigation"; import { useSession, signOut } from "next-auth/react"; import { useTranslation } from "@/lib/i18n"; import LanguageSwitcher from "./LanguageSwitcher"; +import { useState } from "react"; const Navigation = () => { const pathname = usePathname(); const { data: session, status } = useSession(); const { t } = useTranslation(); + const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false); const isActive = (path) => { if (path === "/") return pathname === "/"; - // Exact match for paths if (pathname === path) return true; - // For nested paths, ensure we match the full path segment if (pathname.startsWith(path + "/")) return true; return false; }; @@ -43,67 +43,145 @@ const Navigation = () => { } return ( -