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

slow redirect to /login from un-auth users #18

Closed
codelastnight opened this issue Jul 6, 2024 · 3 comments
Closed

slow redirect to /login from un-auth users #18

codelastnight opened this issue Jul 6, 2024 · 3 comments
Assignees

Comments

@codelastnight
Copy link
Collaborator

codelastnight commented Jul 6, 2024

when inauthenticated, loading into the page renders the logged-in state first, then re-routes to login after a while.

@codelastnight
Copy link
Collaborator Author

fixed by implementing a privateRoute / privateWrapper, as explained in here https://stackoverflow.com/questions/69923420/how-to-use-private-route-in-react-router-domv6

this means i can refactor re-routing from each useQuery Error to be simpler. I personally dont think we need to re-route to login on every failed api response.

@codelastnight
Copy link
Collaborator Author

fixed with this commit 40d29c6

@codelastnight
Copy link
Collaborator Author

I messed up lol. this requires more in-depth look into routing

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

No branches or pull requests

1 participant