Only show string/num info in Details

This commit is contained in:
Dustin Brett 2025-03-01 09:01:44 -08:00
parent 056041443e
commit 88c9f85186

View File

@ -60,24 +60,29 @@ const DetailsTab: FC<TabProps> = ({
<th>{key}</th>
<th className="line" />
</tr>
{Object.entries(data).map(([dataKey, value]) => (
<tr key={`${dataKey}-${value}`}>
<th title={dataKey}>{dataKey}</th>
<td>
{typeof value === "string" &&
value.startsWith("blob:") ? (
<img
alt="Thumbnail"
decoding="async"
loading="lazy"
src={value}
/>
) : (
value
)}
</td>
</tr>
))}
{Object.entries(data)
.filter(
([, value]) =>
typeof value === "string" || typeof value === "number"
)
.map(([dataKey, value]) => (
<tr key={`${dataKey}-${value}`}>
<th title={dataKey}>{dataKey}</th>
<td>
{typeof value === "string" &&
value.startsWith("blob:") ? (
<img
alt="Thumbnail"
decoding="async"
loading="lazy"
src={value}
/>
) : (
value
)}
</td>
</tr>
))}
</Fragment>
)
)}