diff --git a/app/layouts/admin/sidebar.tsx b/app/layouts/admin/sidebar.tsx index 17fd1c2..4d7c0e2 100644 --- a/app/layouts/admin/sidebar.tsx +++ b/app/layouts/admin/sidebar.tsx @@ -5,11 +5,8 @@ import { MENU } from './menu' export const Sidebar = () => { const { pathname } = useLocation() - const path = () => { - // Extract the first three segments for deep paths, otherwise use the full pathname - const segments = pathname.split('/') - return segments.length > 3 ? segments.slice(0, 3).join('/') : pathname - } + const segments = pathname.split('/') + const path = segments.length > 3 ? segments.slice(0, 3).join('/') : pathname return (