diff --git a/client/src/components/ControlPanel.jsx b/client/src/components/ControlPanel.jsx index eabeb21..c5caa80 100644 --- a/client/src/components/ControlPanel.jsx +++ b/client/src/components/ControlPanel.jsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { useState, useCallback } from 'react'; import { useTurtleStore } from '../store/turtleStore'; import './ControlPanel.css'; @@ -6,6 +6,7 @@ function TurtleCard({ turtle, isSelected, onSelect }) { const activeState = turtle.state || turtle.mode || 'idle'; const fuel = turtle.fuel === 'unlimited' ? '∞' : (turtle.fuel || '?'); const inventoryCount = turtle.inventory?.length || 0; + const displayName = turtle.label || `Turtle ${turtle.turtleID}`; const modeColors = { mining: '#4ade80', @@ -33,7 +34,7 @@ function TurtleCard({ turtle, isSelected, onSelect }) { style={{ borderColor: modeColors[activeState] || modeColors.unknown }} >