Changeset View
Changeset View
Standalone View
Standalone View
web/cashtab/src/components/Wallet/ChildNFTList.js
- This file was added.
import React from 'react'; | |||||
import PropTypes from 'prop-types'; | |||||
import TokenListItem from './TokenListItem'; | |||||
import { Link } from 'react-router-dom'; | |||||
import { formatBalance } from '@utils/cashMethods'; | |||||
const ChildNFTList = ({ tokens }) => { | |||||
return ( | |||||
<div> | |||||
{tokens | |||||
.filter(token => token.isChildNFT) | |||||
.map(token => ( | |||||
<Link | |||||
key={token.tokenId} | |||||
to={`/send-child-NFT/${token.tokenId}`} | |||||
> | |||||
<TokenListItem | |||||
ticker={token.info.tokenTicker} | |||||
tokenId={token.tokenId} | |||||
balance={formatBalance(token.balance)} | |||||
/> | |||||
</Link> | |||||
))} | |||||
</div> | |||||
); | |||||
}; | |||||
ChildNFTList.propTypes = { | |||||
tokens: PropTypes.array, | |||||
}; | |||||
export default ChildNFTList; |