login & registration now functional
This commit is contained in:
@@ -17,13 +17,14 @@ var Login = React.createClass({
|
||||
UserStore.removeChangeListener(this.onUserStoreChange);
|
||||
},
|
||||
onUserStoreChange: function() {
|
||||
var loginState = UserStore.getLoginState();
|
||||
|
||||
if (loginState.loggedIn) {
|
||||
NavigationActions.goToHome();
|
||||
} else {
|
||||
|
||||
if(this.isMounted()) {
|
||||
var loginState = UserStore.getLoginState();
|
||||
this.setState({login: loginState});
|
||||
if (loginState.loggedIn) {
|
||||
setTimeout(function(){
|
||||
NavigationActions.goToHome();
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
},
|
||||
getInitialState: function() {
|
||||
|
||||
Reference in New Issue
Block a user