From 525057b79052b2c5d50c2f83f81abcb8385437ee Mon Sep 17 00:00:00 2001 From: Arend Peter Castelein Date: Tue, 21 Nov 2023 19:52:02 -0800 Subject: [PATCH] Rework login / logout button --- frontend/src/components/Header.js | 110 ++++++++++-------------------- 1 file changed, 37 insertions(+), 73 deletions(-) diff --git a/frontend/src/components/Header.js b/frontend/src/components/Header.js index f13e66db..080caeed 100644 --- a/frontend/src/components/Header.js +++ b/frontend/src/components/Header.js @@ -147,92 +147,56 @@ const Header = ({ authSession }) => { Sandbox - {/**** LOG IN/OUT ****/} - - - {authSession.isLoggedIn() ? - <> - + + {authSession.isLoggedIn() && <> + + + + + {authSession.getIdField('email')} - - - - : - + } + {!authSession.isLoggedIn() && + } - - - - - - {authSession.isLoggedIn() ? - <> - - {authSession.getIdField('email')} - - authSession.openLogout()} - > - Logout - - - : - <> - authSession.openLogin()} - > - Login - - - } - - -