diff --git a/src/components/organisms/AssetContent/MetaFull.tsx b/src/components/organisms/AssetContent/MetaFull.tsx index 68d37e99a..74bcb60ac 100644 --- a/src/components/organisms/AssetContent/MetaFull.tsx +++ b/src/components/organisms/AssetContent/MetaFull.tsx @@ -1,4 +1,4 @@ -import React, { ReactElement } from 'react' +import React, { ReactElement, useEffect, useState } from 'react' import Time from '../../atoms/Time' import MetaItem from './MetaItem' import styles from './MetaFull.module.css' @@ -6,6 +6,8 @@ import { MetadataMarket } from '../../../@types/Metadata' import { DDO } from '@oceanprotocol/lib' import EtherscanLink from '../../atoms/EtherscanLink' +import { useOcean } from '@oceanprotocol/react' + export default function MetaFull({ ddo, metadata @@ -13,13 +15,28 @@ export default function MetaFull({ ddo: DDO metadata: MetadataMarket }): ReactElement { + const { ocean, accountId } = useOcean() const { id, dataToken } = ddo const { dateCreated, datePublished, author, license } = metadata.main - const { categories } = metadata.additionalInformation + const { categories, copyrightHolder } = metadata.additionalInformation + + const [dtName, setDtName] = useState() + const [dtSymbol, setDtSymbol] = useState() + + useEffect(() => { + async function getDataTokenInfo() { + const name = await ocean.datatokens.getName(dataToken, accountId) + setDtName(name) + const symbol = await ocean.datatokens.getSymbol(dataToken, accountId) + setDtSymbol(symbol) + } + getDataTokenInfo() + }, []) return (
+ {categories && } } /> @@ -29,16 +46,16 @@ export default function MetaFull({ content={
) } diff --git a/src/components/organisms/AssetContent/MetaSecondary.module.css b/src/components/organisms/AssetContent/MetaSecondary.module.css index 29c793ab5..05dec8123 100644 --- a/src/components/organisms/AssetContent/MetaSecondary.module.css +++ b/src/components/organisms/AssetContent/MetaSecondary.module.css @@ -12,5 +12,5 @@ } .samples { - margin-top: calc(var(--spacer) / 2); + margin-top: var(--spacer); } diff --git a/src/components/organisms/AssetContent/MetaSecondary.tsx b/src/components/organisms/AssetContent/MetaSecondary.tsx index aebd331b4..65d3583f9 100644 --- a/src/components/organisms/AssetContent/MetaSecondary.tsx +++ b/src/components/organisms/AssetContent/MetaSecondary.tsx @@ -14,6 +14,8 @@ export default function MetaSecondary({ return ( ) }