storefront-remix-starter
storefront-remix-starter copied to clipboard
Log-out is possibly not reflected until full refresh
The user is currently able to log out from /account/history
, /account/addresses
and /account/password
, so this mechanism should be revised:
https://github.com/vendure-ecommerce/storefront-remix-starter/blob/e32cebdf914a5667cabca5d45089a0865489a248/app/root.tsx#L57
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: https://github.com/remix-run/remix/issues/8298
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!