now associating a dewar to a slot

This commit is contained in:
GotthardG
2024-11-19 13:43:54 +01:00
parent 48fd2c3a7c
commit fa1e9c86b8
4 changed files with 41 additions and 18 deletions

View File

@ -31,16 +31,11 @@ interface StorageProps {
}
const Storage: React.FC<StorageProps> = ({ name, selectedSlot, slotsData, onSelectSlot }) => {
const [highlightedSlot, setHighlightedSlot] = useState<SlotData | null>(null);
const handleSlotSelect = (slot: SlotData) => {
setHighlightedSlot(slot);
onSelectSlot(slot);
console.log('Selected slot:', slot);
};
console.log("Rendering Storage Component with name:", name);
return (
<StorageContainer>
<Typography variant="h5">{name} Slots</Typography>
@ -54,11 +49,6 @@ const Storage: React.FC<StorageProps> = ({ name, selectedSlot, slotsData, onSele
/>
))}
</StorageWrapper>
{highlightedSlot && (
<Typography variant="subtitle1">
Selected Slot: {highlightedSlot.label}
</Typography>
)}
</StorageContainer>
);
};