From ed497be4b036b6e104477a2bef966b19152de34f Mon Sep 17 00:00:00 2001 From: Andriy Danchyshyn Date: Thu, 10 Oct 2024 19:23:42 +0300 Subject: [PATCH] refactor iteration --- FrontEnd/src/pages/AdminPage/Menu/Menu.jsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/FrontEnd/src/pages/AdminPage/Menu/Menu.jsx b/FrontEnd/src/pages/AdminPage/Menu/Menu.jsx index 74319182..09901e08 100644 --- a/FrontEnd/src/pages/AdminPage/Menu/Menu.jsx +++ b/FrontEnd/src/pages/AdminPage/Menu/Menu.jsx @@ -49,11 +49,13 @@ function Menu() { return (
- {MENU.map((element) => ( - {element.title} - ))} - {isSuperUser && SUPERUSER_MENU.map((element) => ( - {element.title} + {[ + ...MENU, + ...(isSuperUser ? SUPERUSER_MENU : []) + ].map((element) => ( + + {element.title} + ))}