feat: handle 0 in banner card (#5385)

feat: fix web-2411
This commit is contained in:
Mike Grabowski 2022-11-23 00:20:29 +01:00 committed by GitHub
parent 8e9a20a6c8
commit 875171e36a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -204,14 +204,13 @@ export const MarketplaceRow = ({ marketplace, floorInEth, listings }: Marketplac
</TableElement>
<TableElement>
<ThemedText.BodySmall color="textSecondary">
{floorInEth !== undefined
? formatNumberOrString(floorInEth, NumberType.NFTTokenFloorPriceTrailingZeros)
: '-'}{' '}
ETH
{Number(floorInEth) > 0
? `${formatNumberOrString(floorInEth, NumberType.NFTTokenFloorPriceTrailingZeros)} ETH`
: '-'}
</ThemedText.BodySmall>
</TableElement>
<TableElement>
<ThemedText.BodySmall color="textSecondary">{listings ?? '-'}</ThemedText.BodySmall>
<ThemedText.BodySmall color="textSecondary">{Number(listings) > 0 ? listings : 'None'}</ThemedText.BodySmall>
</TableElement>
</>
)