refactor: add color property to newArea state and include it in area creation

This commit is contained in:
MayaTheShy
2026-02-20 04:20:52 -05:00
parent bfae87287a
commit 465a8bacf4

View File

@@ -6,6 +6,7 @@ export default function MiningAreasPanel({ turtles, selectedTurtle, apiUrl }) {
const [showCreateForm, setShowCreateForm] = useState(false);
const [newArea, setNewArea] = useState({
areaName: '',
color: '#4a8c2a',
startX: '',
startY: '',
startZ: '',
@@ -66,6 +67,7 @@ export default function MiningAreasPanel({ turtles, selectedTurtle, apiUrl }) {
endX: Number(newArea.endX),
endY: Number(newArea.endY),
endZ: Number(newArea.endZ),
color: newArea.color,
status: 'planned'
})
});