Skip to content

Fix typo in LoginUser for authentication-with-email-and-apollo example.#5

Open
dansteren wants to merge 1 commit intographcool-examples:masterfrom
dansteren:fix-typo-in-login-component-for-email-auth
Open

Fix typo in LoginUser for authentication-with-email-and-apollo example.#5
dansteren wants to merge 1 commit intographcool-examples:masterfrom
dansteren:fix-typo-in-login-component-for-email-auth

Conversation

@dansteren
Copy link

For authentication-with-email-and-apollo example

Problem:
When navigating to http://localhost:3000/login the following message is displayed.

  11 | }
  12 | 
  13 | render () {
> 14 |   if (this.props.data.loading) {
  15 | 
  16 |     return (
  17 |       <div className='w-100 pa4 flex justify-center'>

Solution
The CreateLogin component uses a named graphql query, so the response is passed to props with that name (loggedInUserQuery) instead of data. This PR replaces this.props.data with this.props.loggedInUserQuery.

The CreateLogin component uses a named graphql query, so the response is passed to props with that name (`loggedInUserQuery`) instead of `data`.
@lionstone
Copy link

Why is this not merged? Had the same error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants