Skip to content
This repository has been archived by the owner on Jan 2, 2024. It is now read-only.

Login popups comes when the browser is refreshed #208

Open
anjula-sack opened this issue Jul 17, 2021 · 3 comments
Open

Login popups comes when the browser is refreshed #208

anjula-sack opened this issue Jul 17, 2021 · 3 comments

Comments

@anjula-sack
Copy link
Member

Describe the bug

  • The login popup comes when the user refreshes the page.

To Reproduce
Steps to reproduce the behaviour:

  1. Go to a page
  2. Refresh the page
  3. Login popup comes and goes

Expected behaviour

  • The popup shouldn't come when the browser refreshed

Desktop (please complete the following information):

  • OS: BigSur
  • Browser : Chrome
@sef-bot
Copy link
Member

sef-bot commented Jul 17, 2021

This issue has been mentioned on SEF Hive. There might be relevant details there:

https://sef.discourse.group/t/final-qa-before-launching-scholarx-for-the-pilot/328/11

@Gravewalker666
Copy link
Member

I think this happens because we have the conditional rendering on the login pop up to check for the user object in the context, which takes additional time to get loaded. Within that short amount of time the UI is getting rendered multiple times, so for that split second between the initial render of the UI and detection of the logged-in user object the login modal pops up.

@cmdrGuyson
Copy link
Contributor

cmdrGuyson commented Aug 5, 2021

I think we can fix this by introducing a "isLoading" global state. And whenever it's in the loading state hold off on conditional rendering

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants