mirror of
https://git.rezel.net/LudoTech/traque.git
synced 2026-02-09 10:20:16 +01:00
improved zone selector
This commit is contained in:
@@ -27,6 +27,16 @@ export function ZoneSelector() {
|
|||||||
changeZoneSettings({min:minZone, max:maxZone, reductionCount: Number(reductionCount), reductionDuration: Number(reductionDuration), reductionInterval: Number(reductionInterval)});
|
changeZoneSettings({min:minZone, max:maxZone, reductionCount: Number(reductionCount), reductionDuration: Number(reductionDuration), reductionInterval: Number(reductionInterval)});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//When the user set one zone, switch to the other
|
||||||
|
useEffect(() => {
|
||||||
|
if(editMode == EditMode.MIN) {
|
||||||
|
setEditMode(EditMode.MAX);
|
||||||
|
}else {
|
||||||
|
setEditMode(EditMode.MIN);
|
||||||
|
}
|
||||||
|
|
||||||
|
}, [minZone, maxZone]);
|
||||||
|
|
||||||
return <div className='w-2/5 h-full gap-1 bg-gray-200 p-10 flex flex-col text-center shadow-2xl overflow-y-scroll'>
|
return <div className='w-2/5 h-full gap-1 bg-gray-200 p-10 flex flex-col text-center shadow-2xl overflow-y-scroll'>
|
||||||
<h2 className="text-2xl">Edit zones</h2>
|
<h2 className="text-2xl">Edit zones</h2>
|
||||||
{editMode == EditMode.MIN && <RedButton onClick={() => setEditMode(EditMode.MAX)}>Edit end zone</RedButton>}
|
{editMode == EditMode.MIN && <RedButton onClick={() => setEditMode(EditMode.MAX)}>Edit end zone</RedButton>}
|
||||||
|
|||||||
Reference in New Issue
Block a user