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

output data token address on asset details

This commit is contained in:
Matthias Kretschmann 2020-07-29 18:36:10 +02:00
parent e624ba0191
commit c2dd8448cf
Signed by: m
GPG Key ID: 606EEEF3C479A91F
4 changed files with 33 additions and 4 deletions

View File

@ -14,3 +14,10 @@
word-break: break-all;
padding: 0;
}
.metaFull svg {
width: var(--font-size-mini);
height: var(--font-size-mini);
display: inline-block;
fill: currentColor;
}

View File

@ -3,14 +3,17 @@ import Time from '../../atoms/Time'
import MetaItem from './MetaItem'
import styles from './MetaFull.module.css'
import { MetadataMarket } from '../../../@types/Metadata'
import { DDO } from '@oceanprotocol/lib'
import { ReactComponent as External } from '../../../images/external.svg'
export default function MetaFull({
did,
ddo,
metadata
}: {
did: string
ddo: DDO
metadata: MetadataMarket
}): ReactElement {
const { id, dataToken } = ddo
const { dateCreated, datePublished, author, license } = metadata.main
const { categories } = metadata.additionalInformation
@ -26,7 +29,23 @@ export default function MetaFull({
content={<Time date={datePublished} />}
/>
<MetaItem title="DID" content={<code>{did}</code>} />
<MetaItem title="DID" content={<code>{id}</code>} />
<MetaItem
title="Data Token Address"
content={
<a
href={`https://rinkeby.etherscan.io/token/${dataToken}`}
title="View on Etherscan"
target="_blank"
rel="noreferrer"
>
<code>
{dataToken} <External />
</code>
</a>
}
/>
</div>
)
}

View File

@ -40,7 +40,7 @@ export default function AssetContent({
<MetaSecondary metadata={metadata} />
<MetaFull did={ddo.id} metadata={metadata} />
<MetaFull ddo={ddo} metadata={metadata} />
<div className={styles.buttonGroup}>
{/* <EditAction

3
src/images/external.svg Normal file
View File

@ -0,0 +1,3 @@
<svg width="15" height="16" viewBox="0 0 15 16" xmlns="http://www.w3.org/2000/svg">
<path d="M1.3158 15.229L12.8696 3.67517L12.7286 14.0733L14.6162 14.0478L14.8 0.428955L1.18121 0.612751L1.15442 2.49911L11.5538 2.35937L0 13.9132L1.3158 15.229Z" />
</svg>

After

Width:  |  Height:  |  Size: 255 B