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

sample output on asset details

This commit is contained in:
Matthias Kretschmann 2020-09-02 12:31:20 +02:00
parent a3721502f5
commit 1972b1dca2
Signed by: m
GPG Key ID: 606EEEF3C479A91F
2 changed files with 13 additions and 11 deletions

View File

@ -1,10 +1,9 @@
import React, { ReactElement } from 'react'
import shortid from 'shortid'
import { ListItem } from '../../atoms/Lists'
import MetaItem from './MetaItem'
import styles from './MetaSecondary.module.css'
import { MetadataMarket } from '../../../@types/Metadata'
import Tags from '../../atoms/Tags'
import Button from '../../atoms/Button'
export default function MetaSecondary({
metadata
@ -15,18 +14,21 @@ export default function MetaSecondary({
return (
<aside className={styles.metaSecondary}>
{links && (
{links && links.length && (
<div className={styles.samples}>
<MetaItem
title="Sample Data"
content={
<ul>
{links?.map((link) => (
<ListItem key={shortid.generate()}>
<a href={link.url}>{link.name}</a>
</ListItem>
))}
</ul>
<Button
href={links[0].url}
target="_blank"
rel="noreferrer"
download
style="text"
size="small"
>
Download Sample
</Button>
}
/>
</div>

View File

@ -27,7 +27,7 @@ export default function AssetContent({
<div className={styles.content}>
<aside className={styles.meta}>
<p>{datePublished && <Time date={datePublished} />}</p>
{categories && (
{categories && categories.length && (
<p>
<Link to={`/search?categories=["${categories[0]}"]`}>
{categories[0]}