From 1da57c9ccc15ba73ad8b4e3f37c1f4cfd7cd739f Mon Sep 17 00:00:00 2001 From: Dan Steren Date: Wed, 7 Feb 2018 11:02:53 -0700 Subject: [PATCH] Fix typo in LoginUser for authentication-with-email-and-apollo example. The CreateLogin component uses a named graphql query, so the response is passed to props with that name (`loggedInUserQuery`) instead of `data`. --- .../src/components/LoginUser.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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('/') }