We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents bee7c7d + 644556c commit dd1fba7Copy full SHA for dd1fba7
src/actions/LoginActions.js
@@ -5,18 +5,18 @@ import RouterContainer from '../services/RouterContainer'
5
export default {
6
loginUser: (jwt) => {
7
var savedJwt = localStorage.getItem('jwt');
8
-
+
9
+ AppDispatcher.dispatch({
10
+ actionType: LOGIN_USER,
11
+ jwt: jwt
12
+ });
13
14
if (savedJwt !== jwt) {
15
var nextPath = RouterContainer.get().getCurrentQuery().nextPath || '/';
16
17
RouterContainer.get().transitionTo(nextPath);
18
localStorage.setItem('jwt', jwt);
19
}
- AppDispatcher.dispatch({
- actionType: LOGIN_USER,
- jwt: jwt
- });
20
},
21
logoutUser: () => {
22
RouterContainer.get().transitionTo('/login');
0 commit comments