atomicdata-dev / atomic-data-browser

This repo is no longer used! Code is moved to Atomic-Server
https://github.com/atomicdata-dev/atomic-server/issues
MIT License
56 stars 9 forks source link

Navigate to home not always working correctly #218

Closed joepio closed 2 years ago

joepio commented 2 years ago

I've noticed a bug in production a few times that I haven't been able to reproduce in development for some time. Sometimes when navigating to the root (the homepage) of a server, the wrong page shows up.

E.g. here we've visited Home, but we still see the Document Edit invite, which was visited a couple of clicks before:

Screenshot 2022-09-16 at 15 13 22
joepio commented 2 years ago

I think it was this line in the routes:

      <Route path='/' element={<ResourcePage subject={removeTrailingSlash(window.location.href)} />} />

This was called whenever AppRoutes was rerendered. And that is not the right time!