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

fix <Authenticated> - never render its children when checkAuth return… #10443

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

adrien-may
Copy link
Contributor

@adrien-may adrien-may commented Jan 11, 2025

…s error

Problem

Using <Authenticated>, we can witness a quick render with the children provided whereas it shouldn't. This happens because react-query returns an object with isPending=False but the callback for error has not been called yet.

Solution

Checking for isError and isPending seems to be more reliable

How To Test

I added a test to demonstrate the problem

Additional Checks

  • The PR targets master for a bugfix, or next for a feature
  • The PR includes unit tests (if not possible, describe why)
  • The PR includes one or several stories (if not possible, describe why)
  • The documentation is up to date

Also, please make sure to read the contributing guidelines.

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.

1 participant