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