diff --git a/src/components/layouts/dashboard/headerWithSidebar/HeaderMenu/index.jsx b/src/components/layouts/dashboard/headerWithSidebar/HeaderMenu/index.jsx
index 5dcf168..0d87a5d 100644
--- a/src/components/layouts/dashboard/headerWithSidebar/HeaderMenu/index.jsx
+++ b/src/components/layouts/dashboard/headerWithSidebar/HeaderMenu/index.jsx
@@ -30,24 +30,25 @@ const HeaderMenu = ({ menu }) => {
open={open}
onClose={handleClose}
>
- {menu.subMenu.map((subMenu, index) => (
- <>
- {subMenu.map(sub => (
-
-
- ))}
- {menu.subMenu.length - 1 !== index && (
-
- )}
- >
- ))}
+ {menu.subMenu.flatMap((subMenu, index) => [
+ ...subMenu.map(sub => (
+
+ )),
+ index < menu.subMenu.length - 1 &&
+ ])}
>
);
};
+
export default HeaderMenu;