Skip to content

Commit

Permalink
nav.jsx: Handle invalid token
Browse files Browse the repository at this point in the history
Signout the user and show the login-modal if the token is invalid

#72
  • Loading branch information
bhawesh96 authored and gitmate-bot committed Nov 1, 2018
1 parent 90f7322 commit a7f237f
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 a7f237f

Please sign in to comment.