MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / transformMenuData

Function transformMenuData

frontend/packages/common/src/utils/navigation.tsx:66–78  ·  view source on GitHub ↗
(data: any[])

Source from the content-addressed store, hash-verified

64}
65
66export 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}

Callers 1

BasicLayoutFunction · 0.90

Calls 1

getNavItemFunction · 0.85

Tested by

no test coverage detected