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

[FE] - Glitch between login and monitor page #1122

Closed
marcelluscaio opened this issue Nov 7, 2024 · 8 comments
Closed

[FE] - Glitch between login and monitor page #1122

marcelluscaio opened this issue Nov 7, 2024 · 8 comments
Labels
design Design related
Milestone

Comments

@marcelluscaio
Copy link
Contributor

Describe the bug
After we login, we can see the login page for about half a second. That seems to be happening because of the protectedRoute component. It needs to get the auth information from redux, and that takes a while since it was recently updated.

To Reproduce
Logout. Open the performance tab on devtools, and record. Login, and when monitor page appears, stop recording. See there is a glitch between login and the monitor page.

Expected behavior
It should provide some sort of loading, and then navigate to the page.

Additional context
I believe there are two things to be done: on the login page, we can add a loading state while user information is not updated, before redirecting.
Also, we could provide a loading state while user is undefined in protectedRoute, for about two seconds. That path may never be reached with what we set in the login phase, but it would be an extra layer of protection

@crunchydosa123
Copy link

Hi, is this taken?

@gorkem-bwl
Copy link
Contributor

Nope, go ahead please. Before starting, write how you are going to implement it.

@crunchydosa123
Copy link

I will start with the suggestion given on your description for this issue. Any notes for cloning the repo and running on localhost?

@gorkem-bwl
Copy link
Contributor

I will start with the suggestion given on your description for this issue. Any notes for cloning the repo and running on localhost?

All the details are in our readme.md file, which also has a section that links to our documentation.

@gorkem-bwl
Copy link
Contributor

@crunchydosa123 let me know if you are moving forward with this issue. Thanks.

@gorkem-bwl gorkem-bwl added the design Design related label Nov 22, 2024
@gorkem-bwl gorkem-bwl added this to the 2.0 milestone Nov 22, 2024
@crunchydosa123
Copy link

Yes

@crunchydosa123
Copy link

crunchydosa123 commented Nov 28, 2024

hey, while trying to replicate the issue, do i need to run the docker containers for backend as well? or is there a way i can simulate it by running using just vite? I am unable to login using just the frontend of course and was wondering if there's another way to go about it in development

@marcelluscaio
Copy link
Contributor Author

I think it's best if you run the whole project. I don't think you'll be able to login without a backend

@crunchydosa123 crunchydosa123 removed their assignment Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design Design related
Projects
None yet
Development

No branches or pull requests

3 participants