Only render tooltip component if swap network is disabled (#15733)

feature/default_network_editable
David Walsh 2 years ago committed by GitHub
parent 9cf401bb92
commit e8232aa714
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 21
      ui/components/app/wallet-overview/eth-overview.js
  2. 22
      ui/components/app/wallet-overview/token-overview.js

@ -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>
)
}
/>
</>
}

@ -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>
)
}
/>
</>
}

Loading…
Cancel
Save