1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

disabled buttons

This commit is contained in:
Matthias Kretschmann 2020-10-26 18:20:34 +01:00
parent 99334f4d74
commit e14d4ad9e0
Signed by: m
GPG Key ID: 606EEEF3C479A91F
2 changed files with 9 additions and 4 deletions

View File

@ -19,7 +19,7 @@ export default function Actions({
actionName: string actionName: string
action: () => void action: () => void
}): ReactElement { }): ReactElement {
const { networkId } = useOcean() const { networkId, ocean } = useOcean()
return ( return (
<> <>
@ -27,7 +27,12 @@ export default function Actions({
{isLoading ? ( {isLoading ? (
<Loader message={loaderMessage} /> <Loader message={loaderMessage} />
) : ( ) : (
<Button style="primary" size="small" onClick={() => action()}> <Button
style="primary"
size="small"
onClick={() => action()}
disabled={!ocean}
>
{actionName} {actionName}
</Button> </Button>
)} )}

View File

@ -167,8 +167,8 @@ export default function Pool({ ddo }: { ddo: DDO }): ReactElement {
<Tooltip content={content.tooltips.liquidity} /> <Tooltip content={content.tooltips.liquidity} />
</> </>
} }
ocean={`${userLiquidity?.ocean}` || '0'} ocean={`${userLiquidity?.ocean}`}
dt={`${userLiquidity?.datatoken}` || '0'} dt={`${userLiquidity?.datatoken}`}
dtSymbol={dtSymbol} dtSymbol={dtSymbol}
poolShares={poolTokens} poolShares={poolTokens}
conversion={totalUserLiquidityInOcean} conversion={totalUserLiquidityInOcean}