(data: any[])
| 64 | } |
| 65 | |
| 66 | export function transformMenuData(data: any[]): MenuItem[] { |
| 67 | return data.map((item) => { |
| 68 | const { name, key, path, icon, children, access } = item |
| 69 | return getNavItem({ |
| 70 | label: name, |
| 71 | key, |
| 72 | path, |
| 73 | icon: icon ? <Icon icon={icon} width="18" height="18" /> : undefined, |
| 74 | children: children ? transformMenuData(children) : undefined, |
| 75 | access |
| 76 | }) |
| 77 | }) |
| 78 | } |
no test coverage detected