diff --git a/frontend/react/src/ui/panels/optionsmenu.tsx b/frontend/react/src/ui/panels/optionsmenu.tsx index 53946a1c..f33f11ab 100644 --- a/frontend/react/src/ui/panels/optionsmenu.tsx +++ b/frontend/react/src/ui/panels/optionsmenu.tsx @@ -41,17 +41,16 @@ export function OptionsMenu(props: { open: boolean; onClose: () => void; childre }, // Specify the content type }; - fetch(`./admin/config`, requestOptions) - .then((response) => { - if (response.status === 200) { - console.log(`Admin password correct`); - getApp().setAdminPassword(password); - getApp().setState(OlympusState.ADMIN) - return response.json(); - } else { - throw new Error("Admin password incorrect"); - } - }) + fetch(`./admin/config`, requestOptions).then((response) => { + if (response.status === 200) { + console.log(`Admin password correct`); + getApp().setAdminPassword(password); + getApp().setState(OlympusState.ADMIN); + return response.json(); + } else { + throw new Error("Admin password incorrect"); + } + }); }; useEffect(() => { @@ -215,7 +214,14 @@ export function OptionsMenu(props: { open: boolean; onClose: () => void; childre >
- {}} coalition={mapOptions.AWACSCoalition} /> + { + mapOptions.AWACSCoalition === "blue" && getApp().getMap().setOption("AWACSCoalition", "neutral"); + mapOptions.AWACSCoalition === "neutral" && getApp().getMap().setOption("AWACSCoalition", "red"); + mapOptions.AWACSCoalition === "red" && getApp().getMap().setOption("AWACSCoalition", "blue"); + }} + coalition={mapOptions.AWACSCoalition} + /> Coalition of unit bullseye info