From 16cc38f1d32614b70a0213453d340a2f6e044e1c Mon Sep 17 00:00:00 2001 From: ivalrivall Date: Sun, 16 Mar 2025 01:22:39 +0700 Subject: [PATCH] fix(selected menu css): change active state for menu --- frontend/src/apps/Navigation/NavigationContainer.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/apps/Navigation/NavigationContainer.jsx b/frontend/src/apps/Navigation/NavigationContainer.jsx index d90e5b3c9..4c2307bc1 100644 --- a/frontend/src/apps/Navigation/NavigationContainer.jsx +++ b/frontend/src/apps/Navigation/NavigationContainer.jsx @@ -59,7 +59,6 @@ function Sidebar({ collapsible, isMobile = false }) { icon: , label: {translate('customers')}, }, - { key: 'invoice', icon: , @@ -103,7 +102,9 @@ function Sidebar({ collapsible, isMobile = false }) { if (currentPath !== location.pathname) { if (location.pathname === '/') { setCurrentPath('dashboard'); - } else setCurrentPath(location.pathname.slice(1)); + } else { + setCurrentPath(location.pathname.split('/')[1]); + } } }, [location, currentPath]);