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

Error in BlogLayout #117

Open
Reoge opened this issue Nov 22, 2024 · 0 comments
Open

Error in BlogLayout #117

Reoge opened this issue Nov 22, 2024 · 0 comments

Comments

@Reoge
Copy link

Reoge commented Nov 22, 2024

I get next error opening home page after "yarn rw dev"

image

Steps to replicate:

  1. do all preparation steps from tutorial
  2. start project (do not change any line in the project)
  3. open home page

The problem appears in Firefox and Google Chrome browsers

The reason the problem happens:

  1. there are several calls to BlogLayout component (5 overall)
  2. useAuth returns at the first call: isAuthenticated - false, currentUser - null. After that: isAuthenticated - true, currentUser - undefined

I tracked down the problem to this line. Replacing throw error to empty object fix the problem

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

1 participant