Clear map actions on reset

This commit is contained in:
Mitchell McCaffrey
2021-02-22 17:14:12 +11:00
parent d244471870
commit 53d4e05502
5 changed files with 11 additions and 10 deletions

View File

@@ -50,7 +50,7 @@ function SelectMapModal({
isOpen,
onDone,
onMapChange,
onMapStateChange,
onMapReset,
// The map currently being view in the map screen
currentMap,
}) {
@@ -290,7 +290,7 @@ function SelectMapModal({
const newState = await resetMap(id);
// Reset the state of the current map if needed
if (currentMap && currentMap.id === id) {
onMapStateChange(newState);
onMapReset(newState);
}
}
setIsLoading(false);