Merge pull request #591 from coralproject/refetch-profile-only-after-login

Only refetch for login on `My Profile`.
This commit is contained in:
Kiwi
2017-05-16 18:12:54 +07:00
committed by GitHub
@@ -26,9 +26,9 @@ class ProfileContainer extends Component {
}
componentWillReceiveProps(nextProps) {
if (this.props.auth.loggedIn !== nextProps.auth.loggedIn) {
if (!this.props.auth.loggedIn && nextProps.auth.loggedIn) {
// Refetch after login/logout.
// Refetch after login.
this.props.data.refetch();
}
}