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:
parent
f988dc1c5e
commit
213240349d
@ -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(
|
||||||
|
@ -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],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user