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

Log-out is possibly not reflected until full refresh #70

Open
floze opened this issue Feb 1, 2024 · 1 comment
Open

Log-out is possibly not reflected until full refresh #70

floze opened this issue Feb 1, 2024 · 1 comment
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@floze
Copy link

floze commented Feb 1, 2024

The user is currently able to log out from /account/history, /account/addresses and /account/password, so this mechanism should be revised:

if (currentUrl.pathname === '/account' && nextUrl.pathname === '/') {

Otherwise the log-out does not get reflected until a full refresh.

Also, not re-validating root upon removing all items from the cart during /checkout gets you redirected to root and the activeOrderFetcher being hung in loading state. This issue might be relevant: remix-run/remix#8298

@kyunal
Copy link
Collaborator

kyunal commented Feb 4, 2024

Thanks for pointing out this oversight. I think maybe we could use something like the useRevalidator hook which would offer greater flexibility instead of having these paths (or conditions) hardcoded. The simple solution would be to just check if the currentUrl starts with /account I suppose.

I will see if I can tackle this, but contributions are welcome!

@kyunal kyunal added bug Something isn't working help wanted Extra attention is needed labels Feb 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants