mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
Merge branch 'main' into feature/compute
This commit is contained in:
commit
b89fcc99da
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user