now associating a dewar to a slot
This commit is contained in:
@ -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>
|
||||
);
|
||||
};
|
||||
|
Reference in New Issue
Block a user