1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 18:00:18 +01:00

Updated Icons in Title of NFTs (#17205)

* icon update for nft

* updated icon for previously owned icon

* removed isPreviouslyOwned condition
This commit is contained in:
Nidhi Kumari 2023-01-23 22:38:35 +05:30 committed by GitHub
parent f988dc1c5e
commit 213240349d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 16 deletions

View File

@ -86,14 +86,7 @@ export default function CollectiblesItems({
const ipfsGateway = useSelector(getIpfsGateway); const ipfsGateway = useSelector(getIpfsGateway);
const history = useHistory(); const history = useHistory();
const renderCollectionImage = ( const renderCollectionImage = (collectionImage, collectionName) => {
isPreviouslyOwnedCollection,
collectionImage,
collectionName,
) => {
if (isPreviouslyOwnedCollection) {
return null;
}
if (collectionImage) { if (collectionImage) {
return ( return (
<img <img
@ -129,7 +122,6 @@ export default function CollectiblesItems({
collectionName, collectionName,
collectionImage, collectionImage,
key, key,
isPreviouslyOwnedCollection,
}) => { }) => {
if (!collectibles.length) { if (!collectibles.length) {
return null; return null;
@ -156,11 +148,7 @@ export default function CollectiblesItems({
alignItems={ALIGN_ITEMS.CENTER} alignItems={ALIGN_ITEMS.CENTER}
className="collectibles-items__collection-header" className="collectibles-items__collection-header"
> >
{renderCollectionImage( {renderCollectionImage(collectionImage, collectionName)}
isPreviouslyOwnedCollection,
collectionImage,
collectionName,
)}
<Typography <Typography
color={COLORS.TEXT_DEFAULT} color={COLORS.TEXT_DEFAULT}
variant={TYPOGRAPHY.H5} variant={TYPOGRAPHY.H5}
@ -256,6 +244,7 @@ export default function CollectiblesItems({
{renderCollection({ {renderCollection({
collectibles: previouslyOwnedCollection.collectibles, collectibles: previouslyOwnedCollection.collectibles,
collectionName: previouslyOwnedCollection.collectionName, collectionName: previouslyOwnedCollection.collectionName,
collectionImage: previouslyOwnedCollection.collectibles[0]?.image,
isPreviouslyOwnedCollection: true, isPreviouslyOwnedCollection: true,
key: PREVIOUSLY_OWNED_KEY, key: PREVIOUSLY_OWNED_KEY,
})} })}
@ -285,6 +274,7 @@ CollectiblesItems.propTypes = {
}), }),
), ),
collectionName: PropTypes.string, collectionName: PropTypes.string,
collectionImage: PropTypes.string,
}), }),
collections: PropTypes.shape({ collections: PropTypes.shape({
collectibles: PropTypes.arrayOf( collectibles: PropTypes.arrayOf(

View File

@ -47,8 +47,7 @@ export function useCollectiblesCollections() {
); );
newCollections[collectible.address] = { newCollections[collectible.address] = {
collectionName: collectionContract?.name || collectible.name, collectionName: collectionContract?.name || collectible.name,
collectionImage: collectionImage: collectionContract?.logo || collectible.image,
collectionContract?.logo || collectible.collectionImage,
collectibles: [collectible], collectibles: [collectible],
}; };
} }