1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-11-15 01:34:57 +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 React, { ReactElement } from 'react'
import styles from './AssetTitle.module.css' import styles from './AssetTitle.module.css'
export default function AssetTitle({ did }: { did: string }): ReactElement { export default function AssetTitle({
const { title } = useMetadata(did) did,
title
}: {
did?: string
title?: string
}): ReactElement {
const metadata = useMetadata(did)
return ( return (
<h3 className={styles.title}> <h3 className={styles.title}>
<Link to={`/asset/${did}`}>{title || did}</Link> <Link to={`/asset/${did}`}>{title || metadata.title || did}</Link>
</h3> </h3>
) )
} }

View File

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