cinny/src/client/action/logout.js
Ajay Bura 1fa1496d7f Added logout in loading screen
Signed-off-by: Ajay Bura <ajbura@gmail.com>
2021-10-27 17:08:26 +05:30

13 lines
262 B
JavaScript

import initMatrix from '../initMatrix';
function logout() {
const mx = initMatrix.matrixClient;
mx.stopClient();
mx.logout().then(() => {
mx.clearStores();
window.localStorage.clear();
window.location.reload();
});
}
export default logout;