refactor: add color property to newArea state and include it in area creation
This commit is contained in:
@@ -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'
|
||||
})
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user