TID-Lab / Aggie-FuCo

Aggie fork that will add gen-ai labelling feature + Junkipedia sourcing to the React version.
MIT License
0 stars 0 forks source link

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

Closed codelastnight closed 1 month ago

codelastnight commented 2 months ago

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

codelastnight commented 2 months ago

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 commented 2 months ago

fixed with this commit https://github.com/TID-Lab/Aggie-FuCo/commit/40d29c650540ca64b919450536c04d52b15e2d01

codelastnight commented 1 month ago

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