Skip to content

Commit

Permalink
nav.jsx: Handle invalid token
Browse files Browse the repository at this point in the history
Logout and show the login-modal if the token is invalid
  • Loading branch information
bhawesh96 committed Oct 31, 2018
1 parent 9839307 commit cd1b558
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/app/nav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ class AppNav extends Component {
// }
this.setState({info});
}).catch(() => {
this.setState({info: null});
alert("Invalid user token");
this.onSignOut();
this.setState({info: null, showModal: true});
});
};

Expand Down

0 comments on commit cd1b558

Please sign in to comment.