On refresh, always getting redirected to home page.
I sort of understand why this is happening but not sure how to fix it.
In the first screenshot is my sign-in component. It basically says if there is a user and we are trying to access
And the 2nd screenshot is my
The problem with this is my
So if I m let's say at
Last screenshot is my current file/folder structure.
Any help appreciated.
In the first screenshot is my sign-in component. It basically says if there is a user and we are trying to access
/sign-in, redirect to home page.And the 2nd screenshot is my
__root.tsx component where as soon as my auth is done, I call router.invalidate(). This makes sure that beforeLoadruns again.The problem with this is my
_public/sign-in route runs again and this time it goes inside the if statement and redirects to /.So if I m let's say at
/borrowings and I hit refresh, I get redirected to /. I m sure I m missing something here I just cannot find what it is.Last screenshot is my current file/folder structure.
Any help appreciated.


