1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-06-26 11:16:51 +02:00
market/src/components/Asset/AssetActions/AssetStats/index.tsx
2022-07-01 10:56:36 +01:00

21 lines
504 B
TypeScript

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 || !asset?.stats || asset?.stats?.orders === 0 ? (
'No sales yet'
) : (
<>
<span className={styles.number}>{asset.stats.orders}</span> sale
{asset.stats.orders === 1 ? '' : 's'}
</>
)}
</footer>
)
}