Only refetch for login

This commit is contained in:
Chi Vinh Le
2017-05-16 17:50:17 +07:00
parent ec19618052
commit e1b80c3317
@@ -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();
}
}