mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-23 06:45:46 +00:00
fix: enhance MainDrawer with typed MenuItem structure and submenu handling
This commit is contained in:
@@ -189,6 +189,8 @@ const MainDrawer = ({
|
||||
);
|
||||
|
||||
const traverseMenuTitle = (menu: typeof activeMenu) => {
|
||||
if (!menu) return;
|
||||
|
||||
const hasSubmenu = menu?.submenu && menu?.submenu.length > 0;
|
||||
|
||||
if (!title) {
|
||||
@@ -197,7 +199,7 @@ const MainDrawer = ({
|
||||
title += ' - ' + menu?.title;
|
||||
}
|
||||
|
||||
if (!hasSubmenu) return;
|
||||
if (!hasSubmenu || !menu.submenu) return;
|
||||
|
||||
const activeSubmenu = menu.submenu.find((item) =>
|
||||
isPathActive(pathname, item.link)
|
||||
|
||||
Reference in New Issue
Block a user