forked from p15670423/monkey
Island UI: fix a race condition between setting island scenario on the UI and on the backend
This commit is contained in:
parent
7245580fa0
commit
96627837b2
|
@ -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})
|
||||||
|
.then(() => {
|
||||||
props.onStatusChange();
|
props.onStatusChange();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue