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

MPP-3644: Update more uses of useIsLoggedIn #4455

Merged
merged 2 commits into from
Feb 29, 2024

Conversation

jwhitlock
Copy link
Member

@jwhitlock jwhitlock commented Feb 29, 2024

Previously, this returned true or false, but now it returns "unknown", "logged-in", or "logged-out". Update some more checks that expected a boolean.

This is (one of?) the causes of the failing Playwright tests, and was caused by #4392. One indication is that the logo in the upper left always links to /accounts/profile, even when logged-out.

@jwhitlock jwhitlock force-pushed the fix-always-logged-in-mpp-3644 branch from 517a02f to 232a5cd Compare February 29, 2024 19:31
Previously, this returned true or false, but now it returns "unknown",
"logged-in", or "logged-out". Update some more checks that expected a
boolean.
@jwhitlock jwhitlock force-pushed the fix-always-logged-in-mpp-3644 branch from 232a5cd to 0c55db8 Compare February 29, 2024 19:32
Copy link
Contributor

@rafeerahman rafeerahman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, confirmed that the tests pass locally, and double checked the uses of useIsLoggedIn.

(non-blocking)

I believe profilesData.isLoading (isLoading comes from useSWR) could be used here instead of checking. I think they accomplish the same thing so it doesn't really matter.

@jwhitlock
Copy link
Member Author

I believe profilesData.isLoading (isLoading comes from useSWR) could be used here instead of checking. I think they accomplish the same thing so it doesn't really matter.

Good suggestion, this worked for me locally and will be easier to find in the documentation.

@jwhitlock jwhitlock added this pull request to the merge queue Feb 29, 2024
Merged via the queue into main with commit 8513199 Feb 29, 2024
27 checks passed
@jwhitlock jwhitlock deleted the fix-always-logged-in-mpp-3644 branch February 29, 2024 22:38
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