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:
parent
31eb89f40f
commit
8eb1023447
@ -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>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user