How, after cleaning the local storage, redirect to the desired page? Now a problem occurs, the user presses the button - Exit, localalstorage is cleared, but the redirection does not occur.
const onHandleSignOut = () => {
localStorage.removeItem('session');
return <Redirect to="/auth" />
}
<li className="header__mainmenu-item" onClick={() => onHandleSignOut()}>
<FaSignOutAlt />
</li>