Не в состоянии покрыть нижеприведенные высказывания в шутку.
initListener = (logout, refreshToken) => {
document.body.addEventListener("click", () => this.reset(logout, refreshToken));
document.body.addEventListener("onkeydown", () => this.reset(logout, refreshToken));
document.body.addEventListener("onkeyup", () => this.reset(logout, refreshToken));
document.body.addEventListener("onkeypress", () => this.reset(logout, refreshToken));
};
и
logout = (logout, refreshToken) => {
logout();
redirect(appConstants.LOGIN, []);
document.body.removeEventListener("click", () => this.reset(logout, refreshToken));
document.body.removeEventListener("keydown", () => this.reset(logout, refreshToken));
document.body.removeEventListener("keyup", () => this.reset(logout, refreshToken));
document.body.removeEventListener("keypress", () => this.reset(logout, refreshToken));
storageClearAll();
};