only show selected layer if layer is selected

This commit is contained in:
ali asaria
2025-04-09 14:15:51 -04:00
parent 16e5ee526a
commit a18a01a29b

View File

@@ -784,21 +784,28 @@ export default function ModelLayerVisualization({
overflow: 'hidden',
}}
/>
<Typography
level="title-md"
sx={{ mt: 1, mb: 0.5, color: 'primary.500' }}
>
Name: {selectedLayer?.userData?.name}
<br />
Type: {selectedLayer?.userData?.type}
<br />
Parameters: {selectedLayer?.userData?.paramCount}
<br />
index: {selectedLayer?.userData?.index}
<br />
Shape: {selectedLayer?.userData?.shape}
<br />
</Typography>
{selectedLayer && (
<>
<Typography level="title-md" sx={{ mt: 1 }}>
Selected Layer:
</Typography>
<Typography
level="body-md"
sx={{ mb: 0.5, color: 'primary.500' }}
>
Name: {selectedLayer?.userData?.name}
<br />
Type: {selectedLayer?.userData?.type}
<br />
Parameters: {selectedLayer?.userData?.paramCount}
<br />
index: {selectedLayer?.userData?.index}
<br />
Shape: {selectedLayer?.userData?.shape}
<br />
</Typography>
</>
)}
</Box>
</>
)}