mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
hide NFT attributes if array is empty or has only items without value
This commit is contained in:
@@ -75,5 +75,6 @@ export default function attributesParser(attributes: Array<unknown>): Metadata['
|
||||
trait_type: _upperFirst(trait || 'property'),
|
||||
};
|
||||
})
|
||||
.filter((item) => item?.value)
|
||||
.filter(Boolean);
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ const TokenInstanceMetadataInfo = ({ data, isLoading: isLoadingProp }: Props) =>
|
||||
</DetailsInfoItem.Value>
|
||||
</>
|
||||
) }
|
||||
{ metadata?.attributes && (
|
||||
{ metadata?.attributes && metadata.attributes.length > 0 && (
|
||||
<>
|
||||
<DetailsInfoItem.Label
|
||||
hint="NFT attributes"
|
||||
|
||||
Reference in New Issue
Block a user