Created
May 26, 2022 15:23
-
-
Save swahaniroy/514e04a45bf29479189735469ac800b3 to your computer and use it in GitHub Desktop.
The index.js file
This file contains hidden or 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
logoutButon.addEventListener('click', function() { | |
const isLeaved = confirm('Do you want to log out?'); | |
if (isLeaved) { | |
// logout from cometchat and then clear storage. | |
CometChatWidget.logout().then(response => { | |
// User successfully logged out. | |
// Perform any clean up if required. | |
// redirect to login page. | |
window.location.href = '/login.html'; | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment