diff --git a/authentication-with-email-and-apollo/src/components/LoginUser.js b/authentication-with-email-and-apollo/src/components/LoginUser.js index fd35697..ee15dbc 100755 --- a/authentication-with-email-and-apollo/src/components/LoginUser.js +++ b/authentication-with-email-and-apollo/src/components/LoginUser.js @@ -11,7 +11,7 @@ class CreateLogin extends React.Component { } render () { - if (this.props.data.loading) { + if (this.props.loggedInUserQuery.loading) { return (
@@ -21,7 +21,7 @@ class CreateLogin extends React.Component { } // redirect if user is logged in - if (this.props.data.loggedInUser.id) { + if (this.props.loggedInUserQuery.loggedInUser.id) { console.warn('already logged in') this.props.history.replace('/') }