mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Display nothing during confirm page load (#8207)
Previously a few mostly-empty `div`s would be shown if a render happened while the confirm page was loading. Now nothing is shown. This shouldn't impact users at all, as this condition should only last a fraction of a second.
This commit is contained in:
parent
8ba35f673e
commit
23a4c62bd5
@ -162,6 +162,10 @@ export default class Home extends PureComponent {
|
||||
|
||||
if (forgottenPassword) {
|
||||
return <Redirect to={{ pathname: RESTORE_VAULT_ROUTE }} />
|
||||
} else if (history.location.pathname.match(/^\/confirm-transaction/)) {
|
||||
// This should only happen if this renders during the redirect to the confirm page
|
||||
// Display nothing while the confirm page loads, to avoid side-effects of rendering normal home view
|
||||
return null
|
||||
}
|
||||
|
||||
return (
|
||||
@ -174,9 +178,6 @@ export default class Home extends PureComponent {
|
||||
(isWideViewport) => (
|
||||
<>
|
||||
{ isWideViewport ? <WalletView /> : null }
|
||||
{
|
||||
!history.location.pathname.match(/^\/confirm-transaction/)
|
||||
? (
|
||||
<div className="home__main-view">
|
||||
{
|
||||
!isWideViewport ? <MenuBar /> : null
|
||||
@ -186,9 +187,6 @@ export default class Home extends PureComponent {
|
||||
</div>
|
||||
<TransactionList />
|
||||
</div>
|
||||
)
|
||||
: null
|
||||
}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user