mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
added total orders on teaser (#1570)
This commit is contained in:
parent
42956a3441
commit
1a3d18460f
@ -24,6 +24,8 @@ export default function AssetTeaser({
|
||||
const isCompute = Boolean(getServiceByName(asset, 'compute'))
|
||||
const accessType = isCompute ? 'compute' : 'access'
|
||||
const { owner } = asset.nft
|
||||
const { orders } = asset.stats
|
||||
|
||||
return (
|
||||
<article className={`${styles.teaser} ${styles[type]}`}>
|
||||
<Link href={`/asset/${asset.id}`}>
|
||||
@ -42,6 +44,7 @@ export default function AssetTeaser({
|
||||
type={type}
|
||||
accessType={accessType}
|
||||
className={styles.typeDetails}
|
||||
totalSales={orders}
|
||||
/>
|
||||
|
||||
<div className={styles.content}>
|
||||
|
@ -10,11 +10,13 @@ const cx = classNames.bind(styles)
|
||||
export default function AssetType({
|
||||
type,
|
||||
accessType,
|
||||
className
|
||||
className,
|
||||
totalSales
|
||||
}: {
|
||||
type: string
|
||||
accessType: string
|
||||
className?: string
|
||||
totalSales?: number
|
||||
}): ReactElement {
|
||||
const styleClasses = cx({
|
||||
[className]: className
|
||||
@ -32,6 +34,10 @@ export default function AssetType({
|
||||
<div className={styles.typeLabel}>
|
||||
{type === 'dataset' ? 'data set' : 'algorithm'}
|
||||
</div>
|
||||
|
||||
<div className={styles.typeLabel}>
|
||||
{totalSales + ' ' + (totalSales === 1 ? 'sale' : 'sales')}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user