Created
May 19, 2021 03:12
-
-
Save m3l1nd4/d86dde12fd526bf0a968d080831bd6cc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const threadsList = document.querySelector('.threads'); | |
const signedInLinks = document.querySelectorAll('.signed-in'); | |
const signedOutLinks = document.querySelectorAll('.signed-out'); | |
const setUpUI = (user) => { | |
if (user) { | |
// Toggle UI Elements | |
signedInLinks.forEach(item => item.style.display = 'inline'); | |
signedOutLinks.forEach(item => item.style.display = 'none'); | |
} else { | |
// Toggle UI Elements | |
signedInLinks.forEach(item => item.style.display = 'none'); | |
signedOutLinks.forEach(item => item.style.display = 'inline'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment