(Fix) Balances tabs fixs (#973)

* Fix cannot change safe from sidebar

* Removes collectibles header for 1.0.0 safes

* Removes exact path in balances route
This commit is contained in:
Agustin Pane 2020-06-01 13:50:45 -03:00 committed by GitHub
parent 4ddffaab76
commit 76eeb17dd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 39 additions and 37 deletions

View File

@ -111,6 +111,8 @@ const Balances = (props) => {
>
Coins
</NavLink>
{erc721Enabled ? (
<>
<Divider className={assetDivider} />
<NavLink
to={`${SAFELIST_ADDRESS}/${address}/balances/collectibles`}
@ -121,14 +123,17 @@ const Balances = (props) => {
>
Collectibles
</NavLink>
</>
) : null}
</Col>
<Switch>
<Route
path={`${SAFELIST_ADDRESS}/${address}/balances/collectibles`}
exact
render={() => {
return (
<>
return !erc721Enabled ? (
<Redirect to={`${SAFELIST_ADDRESS}/${address}/balances`} />
) : (
<Col className={tokenControls} end="sm" sm={6} xs={12}>
<ButtonLink
className={manageTokensButton}
@ -151,7 +156,6 @@ const Balances = (props) => {
/>
</Modal>
</Col>
</>
)
}}
/>
@ -199,12 +203,10 @@ const Balances = (props) => {
/>
<Route
path={`${SAFELIST_ADDRESS}/${address}/balances`}
exact
render={() => {
return wrapInSuspense(<Coins showReceiveFunds={() => onShow('Receive')} showSendFunds={showSendFunds} />)
}}
/>
<Redirect to={`${SAFELIST_ADDRESS}/${address}/balances`} />
</Switch>
<SendModal
activeScreenType="sendFunds"