Closed rivernews closed 3 years ago
The current auth.RequestStatus is more like a global status for all data fetching. It is used for loading indicator, which is ok, but should be moved out of selector store.auth
to somewhere else.
For user profile "Logout" button, we will just show it w/o conditioning on requesting status. Since at the timing of accessing profile page, it's an internal page which already indicates that login process is finished.
⚠️ After logout button pressed - ideally no need to wait for request status, just interrupt existing requests. However, we'll have to cancel those ongoing sagas for data fetching. Cancelling saga is something we'll have to figure out how to do it properly.
Not sure if this is already resolved or not. Closing now, will create new one if any problem emerges.
When logged in, auth request state still remains "requesting". This affects the logout button disable state in profile page.
It seems like the state is same as the data request state. Once all data is loaded, the auth request state becomes "complete".