Island UI: fix a race condition between setting island scenario on the UI and on the backend

This commit is contained in:
VakarisZ 2021-07-22 16:27:40 +03:00 committed by Mike Salvatore
parent 7245580fa0
commit 96627837b2
1 changed files with 4 additions and 2 deletions

View File

@ -55,8 +55,10 @@ const LandingPageComponent = (props) => {
} }
function setScenario(scenario: string) { function setScenario(scenario: string) {
IslandHttpClient.post('/api/island-mode', {'mode': scenario}); IslandHttpClient.post('/api/island-mode', {'mode': scenario})
props.onStatusChange(); .then(() => {
props.onStatusChange();
});
} }
} }