Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
menus,
selectedKey,
openKeys,
menuComponent,
ListProps,
CollapseProps,
getItemProps,
getConfig,
onClick,
} = props;
const keyMap = useMemo(() => mapNestedPath(menus), [menus]);
const {
injectParentProps,
injectItemProps,
injectListProps,
} = useNestedMenuList(selectedKey, openKeys);
const renderMenus = (level, keyPath) => item => {
const { key, label, subMenus, ...itemProps } = item;
const params = {
...getConfig(level),
...item,
onClick,
classes: css,
level,
keyMap,
keyPath,
};
const calculatedProps = injectItemProps(params);
const nextLevel = level + 1;
const menu = (