1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-06-29 00:57:50 +02:00
market/src/components/Asset/AssetActions/AssetStats/index.tsx

21 lines
504 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}>
2022-07-01 11:56:36 +02:00
{!asset || !asset?.stats || asset?.stats?.orders === 0 ? (
'No sales yet'
) : (
<>
<span className={styles.number}>{asset.stats.orders}</span> sale
{asset.stats.orders === 1 ? '' : 's'}
</>
)}
</footer>
)
}