1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-11-14 17:24:51 +01:00

boomarks title fix

This commit is contained in:
Matthias Kretschmann 2020-10-29 19:25:31 +01:00
parent 31eb89f40f
commit 8eb1023447
Signed by: m
GPG Key ID: 606EEEF3C479A91F
2 changed files with 12 additions and 4 deletions

View File

@ -3,11 +3,18 @@ import { Link } from 'gatsby'
import React, { ReactElement } from 'react'
import styles from './AssetTitle.module.css'
export default function AssetTitle({ did }: { did: string }): ReactElement {
const { title } = useMetadata(did)
export default function AssetTitle({
did,
title
}: {
did?: string
title?: string
}): ReactElement {
const metadata = useMetadata(did)
return (
<h3 className={styles.title}>
<Link to={`/asset/${did}`}>{title || did}</Link>
<Link to={`/asset/${did}`}>{title || metadata.title || did}</Link>
</h3>
)
}

View File

@ -27,7 +27,8 @@ const columns = [
{
name: 'Data Set',
selector: function getAssetRow(row: DDO) {
return <AssetTitle did={row.id} />
const { attributes } = row.findServiceByType('metadata')
return <AssetTitle title={attributes.main.name} />
},
grow: 2
},