diff --git a/frontend/src/component/menu/drawer.jsx b/frontend/src/component/menu/drawer.jsx index fe4b020920..755303f28d 100644 --- a/frontend/src/component/menu/drawer.jsx +++ b/frontend/src/component/menu/drawer.jsx @@ -14,6 +14,33 @@ function getIcon(name) { } } +function renderLink(link) { + if (link.path) { + return ( + + {getIcon(link.icon)} {link.value} + + ); + } else { + return ( + + {getIcon(link.icon)} {link.value} + + ); + } +} + export const DrawerMenu = ({ links = [] }) => ( @@ -36,19 +63,7 @@ export const DrawerMenu = ({ links = [] }) => ( ))}
- - {links.map(link => ( - - {getIcon(link.icon)} {link.value} - - ))} - + {links.map(renderLink)}
);