Skip to content

Commit

Permalink
Only render tooltip component if swap network is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
darkwing committed Sep 1, 2022
1 parent ece5901 commit f6b57d3
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 18 deletions.
21 changes: 12 additions & 9 deletions ui/components/app/wallet-overview/eth-overview.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,15 +165,18 @@ const EthOverview = ({ className }) => {
}
}}
label={t('swap')}
tooltipRender={(contents) => (
<Tooltip
title={t('currentlyUnavailable')}
position="bottom"
disabled={isSwapsChain}
>
{contents}
</Tooltip>
)}
tooltipRender={
isSwapsChain
? null
: (contents) => (
<Tooltip
title={t('currentlyUnavailable')}
position="bottom"
>
{contents}
</Tooltip>
)
}
/>
</>
}
Expand Down
22 changes: 13 additions & 9 deletions ui/components/app/wallet-overview/token-overview.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,19 @@ const TokenOverview = ({ className, token }) => {
}
}}
label={t('swap')}
tooltipRender={(contents) => (
<Tooltip
title={t('currentlyUnavailable')}
position="bottom"
disabled={isSwapsChain}
>
{contents}
</Tooltip>
)}
tooltipRender={
isSwapsChain
? null
: (contents) => (
<Tooltip
title={t('currentlyUnavailable')}
position="bottom"
disabled={isSwapsChain}
>
{contents}
</Tooltip>
)
}
/>
</>
}
Expand Down

0 comments on commit f6b57d3

Please sign in to comment.