From fa3fff13f6251089ccdeb67be22da342aabe6eca Mon Sep 17 00:00:00 2001 From: caturbgs Date: Wed, 22 Dec 2021 20:18:38 +0700 Subject: [PATCH] style: add logout icon, and hide profile menu on admin --- src/pages/App/DesktopLayout.js | 70 ++++++++++++++++++---------------- 1 file changed, 38 insertions(+), 32 deletions(-) diff --git a/src/pages/App/DesktopLayout.js b/src/pages/App/DesktopLayout.js index 047bd99..90ca4ee 100644 --- a/src/pages/App/DesktopLayout.js +++ b/src/pages/App/DesktopLayout.js @@ -9,6 +9,7 @@ import { FileProtectOutlined, FileSyncOutlined, HomeOutlined, + LogoutOutlined, MenuOutlined, PayCircleOutlined, ProfileOutlined, @@ -353,41 +354,45 @@ export const DesktopLayout = observer(() => { autoAdjustOverflow={true} placement="bottomRight" content={ - - - - Profile - - - { - store.authentication.logout(); - history.push("/login"); - }} + - Sign out - - + {store.authentication.userData.role !== "Admin" && + + + Profile + + + } + { + store.authentication.logout(); + history.push("/login"); + }} + > + + Sign out + + } title={ - - {store.user.data.username} - - {store.authentication.userData.username} - - + + {store.user.data.username} + + {store.authentication.userData.username} + + } trigger="click" visible={clicked} @@ -475,6 +480,7 @@ export const DesktopLayout = observer(() => { history.push("/login"); }} > + Sign out