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

Merge branch 'main' into feature/compute

This commit is contained in:
Matthias Kretschmann 2021-04-23 15:46:50 +02:00
commit b89fcc99da
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -48,14 +48,16 @@ export default function AssetContent(props: AssetContentProps): ReactElement {
const [showPricing, setShowPricing] = useState(false)
const [showEdit, setShowEdit] = useState<boolean>()
const [showEditCompute, setShowEditCompute] = useState<boolean>()
const [isOwner, setIsOwner] = useState(false)
const { ddo, price, metadata } = useAsset()
const isOwner = accountId === owner
useEffect(() => {
if (!price) return
if (!accountId || !owner) return
const isOwner = accountId.toLowerCase() === owner.toLowerCase()
setIsOwner(isOwner)
setShowPricing(isOwner && price.type === '')
}, [isOwner, price])
}, [accountId, price, owner])
function handleEditButton() {
// move user's focus to top of screen