Removed unused map select code
This commit is contained in:
parent
67deb67979
commit
0d2b6bf4b0
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user