diff --git a/src/Experience/Components/Menu.js b/src/Experience/Components/Menu.js index df0fb2e9..78ee7ca1 100644 --- a/src/Experience/Components/Menu.js +++ b/src/Experience/Components/Menu.js @@ -167,8 +167,20 @@ export default class Menu { if (loginBtn) { loginBtn.disabled = instance.logInLogOut.login + } + + if (logoutBtn) { logoutBtn.disabled = instance.logInLogOut.logout } + + if (instance.logInLogOut.logout === false) { + const nameInitials = + instance.experience.auth0.userData.given_name.substr(0, 1) + + instance.experience.auth0.userData.family_name.substr(0, 1) + + // Set user's name initials + logoutBtn.querySelector('.name-initials').textContent = nameInitials + } } login = async () => { diff --git a/src/index.html b/src/index.html index b7f09e9d..11d6d572 100644 --- a/src/index.html +++ b/src/index.html @@ -151,6 +151,7 @@