From aa64ee62f7956f80e285d35cecb9cde63daebe94 Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Fri, 1 Sep 2023 10:00:10 +0300 Subject: [PATCH] fix teaser --- src/components/@shared/AssetTeaser/index.tsx | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/components/@shared/AssetTeaser/index.tsx b/src/components/@shared/AssetTeaser/index.tsx index dd9c4a3fb..2a6fcf15b 100644 --- a/src/components/@shared/AssetTeaser/index.tsx +++ b/src/components/@shared/AssetTeaser/index.tsx @@ -29,16 +29,11 @@ export default function AssetTeaser({ const isCompute = Boolean(getServiceByName(asset, 'compute')) const accessType = isCompute ? 'compute' : 'access' const { owner } = asset.nft - const { orders, allocated } = asset.stats - const price: AssetPrice = asset?.stats?.price?.value - ? asset?.stats?.price - : { - value: Number(asset?.accessDetails?.price), - tokenSymbol: asset?.accessDetails?.baseToken?.symbol, - tokenAddress: asset?.accessDetails?.baseToken?.address - } + const { orders, allocated, price } = asset.stats const isUnsupportedPricing = - !asset.services.length || asset?.accessDetails?.type === 'NOT_SUPPORTED' + !asset.services.length || + price.value === undefined || + asset?.accessDetails?.type === 'NOT_SUPPORTED' const { locale } = useUserPreferences() return (