More consistent loading on Accounts #719
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Right now, If you navigate to the Account(Home) tab you might notice that there is a very quick "flash of screen".
This happens because we use the
accountBalanceStatus
to conditionally render the page body but nothing resets it after navigating away from this page so when you land on the page you are inaccountBalanceStatus.success
which does not skip the render and quickly flashes the bare screen before the effect kicks off the api call and resets the loading/data fetching cycle.I added an action to
resetAccountBalanceStatus
and dispatch it on dismount of Account in order to avoid this.I also tweaked the height on the loader div for SendAmount in order to expose the tabs underneath, before they were covered by the transparent bg of the loader div which prevented users from being able to nav while loading is taking place. This likely never happens but if the call took a long time for some reason or hung then the user could still nav away from the tab and do other stuff.