Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any advice for a few errors with next.js example? #861

Closed
weisisheng opened this issue Feb 28, 2021 · 2 comments
Closed

Any advice for a few errors with next.js example? #861

weisisheng opened this issue Feb 28, 2021 · 2 comments

Comments

@weisisheng
Copy link
Contributor

I swapped out the current graphql.js from the old one and get:

error 1

warn - ./pages/_app.jsx
Anonymous arrow functions cause Fast Refresh to not preserve local component state.
Please add a name to your function, for example:

Before
export default () =>

;

After
const Named = () =>

;
export default Named;

I assigned the function a name and then error #2 pops up:

/components/index.js

Unhandled Runtime Error
TypeError: Cannot read property 'total' of null

{data?.results.summary.total} Results

When I swap out this line for a simpler one, I then get a 'map' related error, so I thought I would act the community first.

@weisisheng
Copy link
Contributor Author

Will wait for next revision of code a la discord group.

@joemcelroy
Copy link
Member

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

No branches or pull requests

2 participants