From b145197a00c3e41cdce01ba2809ea9fdfe035d14 Mon Sep 17 00:00:00 2001 From: toan Date: Tue, 20 Aug 2024 14:14:37 +0700 Subject: [PATCH] check for talis length --- .../src/screens/home/components/nft-card.tsx | 131 +++++++++--------- 1 file changed, 66 insertions(+), 65 deletions(-) diff --git a/packages/mobile/src/screens/home/components/nft-card.tsx b/packages/mobile/src/screens/home/components/nft-card.tsx index f116f4f19..8445d4b6f 100644 --- a/packages/mobile/src/screens/home/components/nft-card.tsx +++ b/packages/mobile/src/screens/home/components/nft-card.tsx @@ -36,76 +36,77 @@ export const NftCard = observer(() => { )} - {nfts.map((it, index) => { - const coinDenom = it?.chainInfo?.stakeCurrency?.coinDenom; - if (it?.data?.length > 0) { - return ( - - - - 0 && + nfts.map((it, index) => { + const coinDenom = it?.chainInfo?.stakeCurrency?.coinDenom; + if (it?.data?.length > 0) { + return ( + + + + + + {`${it?.chainInfo?.chainName}`} + {it?.title} + + + + + {`${maskedNumber(it?.count)} NFT${ + Number(it?.count) > 0 ? "s" : "" + }`}{" "} + + + + {it?.data?.map((nft, indexNft) => ( + + ))} + + {Number(it?.count) > 4 && ( + { + navigate(SCREENS.Nfts, { + chainInfo: it?.chainInfo, + ecosystem: it?.ecosystem, + contractAddress: it?.contractAddress, + }); + + return; }} /> - - - {`${it?.chainInfo?.chainName}`} - - {it?.title} - - - - - {`${maskedNumber(it?.count)} NFT${ - Number(it?.count) > 0 ? "s" : "" - }`}{" "} - + )} - - {it?.data?.map((nft, indexNft) => ( - - ))} - - {Number(it?.count) > 4 && ( - { - navigate(SCREENS.Nfts, { - chainInfo: it?.chainInfo, - ecosystem: it?.ecosystem, - contractAddress: it?.contractAddress, - }); - - return; - }} - /> - )} - - ); - } - })} + ); + } + })} ); });