Skip to content

Commit

Permalink
feat(wallet-dashboard): add missing media type field in visual asset …
Browse files Browse the repository at this point in the history
…details (#4360)
  • Loading branch information
evavirseda authored Dec 4, 2024
1 parent f47fff0 commit 8932624
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0

import React from 'react';
import { ExplorerLinkType, useNftDetails, Collapsible } from '@iota/core';
import { ExplorerLinkType, useNftDetails, Collapsible, useNFTBasicData } from '@iota/core';
import {
Button,
ButtonType,
Expand Down Expand Up @@ -41,7 +41,9 @@ export function DetailsView({ onClose, asset, onSend }: DetailsViewProps) {
formatMetaValue,
isContainedInKiosk,
kioskItem,
objectData,
} = useNftDetails(objectId, senderAddress);
const { fileExtensionType, filePath } = useNFTBasicData(objectData);

function handleMoreAboutKiosk() {
window.open('https://docs.iota.org/references/ts-sdk/kiosk/', '_blank');
Expand Down Expand Up @@ -127,6 +129,15 @@ export function DetailsView({ onClose, asset, onSend }: DetailsViewProps) {
fullwidth
/>
)}
<KeyValueInfo
keyText="Media Type"
value={
filePath && fileExtensionType.name && fileExtensionType.type
? `${fileExtensionType.name} ${fileExtensionType.type}`
: '-'
}
fullwidth
/>
</div>
</Collapsible>
{metaKeys.length ? (
Expand Down

0 comments on commit 8932624

Please sign in to comment.