1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 01:47:00 +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 history = useHistory();
const renderCollectionImage = (
isPreviouslyOwnedCollection,
collectionImage,
collectionName,
) => {
if (isPreviouslyOwnedCollection) {
return null;
}
const renderCollectionImage = (collectionImage, collectionName) => {
if (collectionImage) {
return (
<img
@ -129,7 +122,6 @@ export default function CollectiblesItems({
collectionName,
collectionImage,
key,
isPreviouslyOwnedCollection,
}) => {
if (!collectibles.length) {
return null;
@ -156,11 +148,7 @@ export default function CollectiblesItems({
alignItems={ALIGN_ITEMS.CENTER}
className="collectibles-items__collection-header"
>
{renderCollectionImage(
isPreviouslyOwnedCollection,
collectionImage,
collectionName,
)}
{renderCollectionImage(collectionImage, collectionName)}
<Typography
color={COLORS.TEXT_DEFAULT}
variant={TYPOGRAPHY.H5}
@ -256,6 +244,7 @@ export default function CollectiblesItems({
{renderCollection({
collectibles: previouslyOwnedCollection.collectibles,
collectionName: previouslyOwnedCollection.collectionName,
collectionImage: previouslyOwnedCollection.collectibles[0]?.image,
isPreviouslyOwnedCollection: true,
key: PREVIOUSLY_OWNED_KEY,
})}
@ -285,6 +274,7 @@ CollectiblesItems.propTypes = {
}),
),
collectionName: PropTypes.string,
collectionImage: PropTypes.string,
}),
collections: PropTypes.shape({
collectibles: PropTypes.arrayOf(

View File

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