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: add hasToken to avoid loading repo to early #147

Merged
merged 1 commit into from
Dec 13, 2022
Merged

Conversation

lihebi
Copy link
Collaborator

@lihebi lihebi commented Dec 13, 2022

When refreshing on the repo page, the loadRepo call may be too early before user info is set (useMe). The new hasToken directly checks localStorage, thus can be an immediate indicator of whether the user has signed-in. Thus it is generally safer to use then useMe).

@lihebi lihebi merged commit 1ffe316 into main Dec 13, 2022
sudongyuer pushed a commit to sudongyuer/codepod that referenced this pull request Dec 14, 2022
@lihebi lihebi deleted the add_auth_hastoken branch June 30, 2023 16:31
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