1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-07-01 06:11:43 +02:00
market/src/components/Asset/AssetActions/AssetStats/index.tsx

21 lines
475 B
TypeScript
Raw Normal View History

import { useAsset } from '@context/Asset'
import React from 'react'
import styles from './index.module.css'
export default function AssetStats() {
const { asset } = useAsset()
return (
<footer className={styles.stats}>
{asset.stats.orders === 0 ? (
'No sales yet'
) : (
<>
<span className={styles.number}>{asset.stats.orders}</span> sale
{asset.stats.orders === 1 ? '' : 's'}
</>
)}
</footer>
)
}