Redirect after logout not before (helps with verify-email popup)

This commit is contained in:
Vesa Luusua 2017-09-14 19:55:24 +03:00
parent e121f0c3ae
commit 99752865d8

View file

@ -133,9 +133,9 @@ class TopbarComponent extends Component {
handleLogout() {
const { onLogout, history, flattenedRoutes } = this.props;
const path = pathByRouteName('LandingPage', flattenedRoutes);
history.push(path);
onLogout().then(() => {
const path = pathByRouteName('LandingPage', flattenedRoutes);
history.push(path);
// TODO: show flash message
console.log('logged out'); // eslint-disable-line
});