Removed unused map select code

This commit is contained in:
Mitchell McCaffrey 2020-04-30 14:40:05 +10:00
parent 67deb67979
commit 0d2b6bf4b0

View File

@ -89,23 +89,12 @@ function SelectMapModal({
const defaultMapsWithIds = await getDefaultMaps();
const allMaps = [...sortedMaps, ...defaultMapsWithIds];
setMaps(allMaps);
// TODO: Does this work with default maps?
if (selectedMap) {
const map = await db.table("maps").get(selectedMap.id);
const state = await db.table("states").get(selectedMap.id);
if (map) {
setSelectedMap(map);
}
if (state) {
setSelectedMapState(state);
}
}
}
if (!wasOpen && isOpen) {
loadMaps();
}
}, [userId, isOpen, wasOpen, selectedMap]);
}, [userId, isOpen, wasOpen]);
const fileInputRef = useRef();