1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-11-15 01:34:57 +01:00

compute & consume tweaks

This commit is contained in:
Matthias Kretschmann 2020-10-20 21:16:04 +02:00
parent 2163ab643b
commit 0497904bb5
Signed by: m
GPG Key ID: 606EEEF3C479A91F
5 changed files with 17 additions and 12 deletions

View File

@ -24,7 +24,5 @@
}
.hasTokens {
font-size: var(--font-size-small);
color: var(--color-secondary);
margin-top: calc(var(--spacer) / 4);
composes: hasTokens from './index.module.css';
}

View File

@ -110,8 +110,8 @@ export default function Compute({
<Price ddo={ddo} conversion />
{hasDatatoken && (
<div className={styles.hasTokens}>
You own {dtBalance} {dtSymbol} so you can use this asset without
paying again.
You own {dtBalance} {dtSymbol} allowing you to use this data set
without paying again.
</div>
)}
</div>
@ -135,7 +135,7 @@ export default function Compute({
onClick={() => startJob()}
disabled={isComputeButtonDisabled}
>
Start job
{hasDatatoken ? 'Start job' : 'Buy'}
</Button>
</div>

View File

@ -18,7 +18,5 @@
}
.hasTokens {
font-size: var(--font-size-small);
color: var(--color-secondary);
margin-top: calc(var(--spacer) / 4);
composes: hasTokens from './index.module.css';
}

View File

@ -33,7 +33,10 @@ export default function Consume({
const { consumeStepText, consume, consumeError } = useConsume()
const isDisabled =
!ocean || !isBalanceSufficient || consumeStepText || pricingIsLoading
!ocean ||
!isBalanceSufficient ||
typeof consumeStepText !== 'undefined' ||
pricingIsLoading
const hasDatatoken = Number(dtBalance) >= 1
async function handleConsume() {
@ -69,8 +72,8 @@ export default function Consume({
<Price ddo={ddo} conversion />
{hasDatatoken && (
<div className={styles.hasTokens}>
You own {dtBalance} {dtSymbol} so you can use this asset without
paying again.
You own {dtBalance} {dtSymbol} allowing you to use this data set
without paying again.
</div>
)}
<PurchaseButton />

View File

@ -4,3 +4,9 @@
margin: auto;
padding: 0;
}
.hasTokens {
font-size: var(--font-size-mini);
color: var(--color-secondary);
margin-top: calc(var(--spacer) / 12);
}