Created
December 3, 2021 04:56
-
-
Save hieptl/155121db3c43680ddb8cc7662ecb53ca to your computer and use it in GitHub Desktop.
header.js - client - logout - Zoom Clone
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
| const logout = async () => { | |
| const isLogout = window.confirm('Do you want to log out ?'); | |
| if (isLogout) { | |
| await cometChat.logout(); | |
| setUser(null); | |
| localStorage.removeItem('auth'); | |
| history.push('/login'); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment