refactor: align document type page with root groups
This commit is contained in:
@@ -1032,11 +1032,15 @@ function buildFallbackRoutes(roleKey: string): {
|
||||
};
|
||||
}
|
||||
|
||||
function isLegacyRuleSetsMenu(path: string | undefined): boolean {
|
||||
return path === '/rules/sets';
|
||||
}
|
||||
|
||||
function normalizeMenuStructure(menuItems: MenuItem[]): MenuItem[] {
|
||||
const clonedMenuItems = menuItems.map(item => ({
|
||||
...item,
|
||||
children: item.children ? normalizeMenuStructure(item.children) : undefined,
|
||||
}));
|
||||
})).filter(item => !isLegacyRuleSetsMenu(item.path));
|
||||
|
||||
const collectDescendantPaths = (items: MenuItem[] | undefined): string[] => {
|
||||
if (!items || items.length === 0) {
|
||||
|
||||
Reference in New Issue
Block a user