cinny/src/client/action/logout.js

14 lines
262 B
JavaScript
Raw Normal View History

2021-07-28 13:15:52 +00:00
import initMatrix from '../initMatrix';
function logout() {
const mx = initMatrix.matrixClient;
mx.stopClient();
2021-07-28 13:15:52 +00:00
mx.logout().then(() => {
mx.clearStores();
window.localStorage.clear();
window.location.reload();
});
}
export default logout;