Skip to content

Commit

Permalink
fix: SCAN-4011
Browse files Browse the repository at this point in the history
  • Loading branch information
0x74616e67 committed May 27, 2022
1 parent 99841c0 commit 996c7f9
Showing 1 changed file with 29 additions and 24 deletions.
53 changes: 29 additions & 24 deletions src/app/containers/NFTAsset/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ export function NFTAsset({
contract,
type,
};
let NFTs: any = {};
let NFTs: any = {
list: [],
total: 0,
};
let total = 0;

setLoading(true);
Expand Down Expand Up @@ -223,16 +226,6 @@ export function NFTAsset({
) : null}

<NFTWrapper>
<div className="total">
{t(translations.blocks.tipCountBefore)} {toThousands(total)}{' '}
{lang === 'zh' ? '个 ' : ''}
{selectedNFT.name || ''} NFT{' '}
<span>
{t(translations.contract.address)}:{' '}
<AddressContainer value={selectedNFT.contract} />
</span>
</div>

{!loading && !NFTs.length ? (
<div className="nodata">
<Empty
Expand All @@ -250,19 +243,31 @@ export function NFTAsset({
/>
</div>
) : (
<Row gutter={20}>
{NFTs.map(({ tokenId, amount, owner }) => (
<Col xs={24} sm={12} lg={6} xl={4} key={tokenId}>
<NFTPreview
contractAddress={selectedNFT?.contract}
tokenId={tokenId}
type="card"
amount={amount}
owner={owner}
/>
</Col>
))}
</Row>
<>
<div className="total">
{t(translations.blocks.tipCountBefore)} {toThousands(total)}{' '}
{lang === 'zh' ? '个 ' : ''}
{selectedNFT.name || ''} NFT{' '}
<span>
{t(translations.contract.address)}:{' '}
<AddressContainer value={selectedNFT.contract} />
</span>
</div>

<Row gutter={20}>
{NFTs.map(({ tokenId, amount, owner }) => (
<Col xs={24} sm={12} lg={6} xl={4} key={tokenId}>
<NFTPreview
contractAddress={selectedNFT?.contract}
tokenId={tokenId}
type="card"
amount={amount}
owner={owner}
/>
</Col>
))}
</Row>
</>
)}

<Pagination
Expand Down

0 comments on commit 996c7f9

Please sign in to comment.