Commit e262937d authored by tom's avatar tom Committed by tom goriunov

hide NFT attributes if array is empty or has only items without value

parent 2b300205
...@@ -75,5 +75,6 @@ export default function attributesParser(attributes: Array<unknown>): Metadata[' ...@@ -75,5 +75,6 @@ export default function attributesParser(attributes: Array<unknown>): Metadata['
trait_type: _upperFirst(trait || 'property'), trait_type: _upperFirst(trait || 'property'),
}; };
}) })
.filter((item) => item?.value)
.filter(Boolean); .filter(Boolean);
} }
...@@ -123,7 +123,7 @@ const TokenInstanceMetadataInfo = ({ data, isLoading: isLoadingProp }: Props) => ...@@ -123,7 +123,7 @@ const TokenInstanceMetadataInfo = ({ data, isLoading: isLoadingProp }: Props) =>
</DetailsInfoItem.Value> </DetailsInfoItem.Value>
</> </>
) } ) }
{ metadata?.attributes && ( { metadata?.attributes && metadata.attributes.length > 0 && (
<> <>
<DetailsInfoItem.Label <DetailsInfoItem.Label
hint="NFT attributes" hint="NFT attributes"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment