1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 11:22:43 +02:00

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

This commit is contained in:
David Walsh 2022-09-09 14:12:54 -05:00 committed by GitHub
parent 9cf401bb92
commit e8232aa714
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 18 deletions

View File

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

View File

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