mirror of
https://github.com/oceanprotocol/market.git
synced 2024-11-14 09:14:52 +01:00
fix download button (#213)
Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>
This commit is contained in:
parent
300aedc856
commit
35fd83de73
@ -35,13 +35,20 @@ export default function Consume({
|
||||
pricingIsLoading
|
||||
} = usePricing(ddo)
|
||||
const { consumeStepText, consume, consumeError } = useConsume()
|
||||
const isDisabled =
|
||||
!ocean ||
|
||||
!isBalanceSufficient ||
|
||||
typeof consumeStepText !== 'undefined' ||
|
||||
pricingIsLoading
|
||||
const [isDisabled, setIsDisabled] = useState(true)
|
||||
|
||||
const hasDatatoken = Number(dtBalance) >= 1
|
||||
|
||||
useEffect(() => {
|
||||
setIsDisabled(
|
||||
(!ocean ||
|
||||
!isBalanceSufficient ||
|
||||
typeof consumeStepText !== 'undefined' ||
|
||||
pricingIsLoading) &&
|
||||
!hasPreviousOrder
|
||||
)
|
||||
}, [hasPreviousOrder, isBalanceSufficient, consumeStepText, pricingIsLoading])
|
||||
|
||||
useEffect(() => {
|
||||
if (!ocean || !accountId) return
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user