Commit 0eb2e05b authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg Committed by Gijs Hendriksen
Browse files

Reset login state after restoring saved login data

parent fceda41c
......@@ -10,7 +10,7 @@ import 'moment/locale/nl';
import * as reducers from './reducers';
import sagas from './sagas';
import ReduxNavigator from './components/navigator';
import { success } from './actions/login';
import * as loginActions from './actions/login';
const createStoreWithMiddleware = applyMiddleware(thunk)(createStore);
const sagaMiddleware = createSagaMiddleware();
......@@ -42,7 +42,8 @@ class Main extends Component {
const photo = values[PHOTOKEY];
if (username !== null && token !== null) {
store.dispatch(success(username, token, displayName, photo));
store.dispatch(loginActions.success(username, token, displayName, photo));
store.dispatch(loginActions.reset());
}
});
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment