Updated update map
This commit is contained in:
parent
97c436b5e4
commit
b70bcdabd2
@ -132,7 +132,11 @@ export function MapDataProvider({ children }) {
|
||||
|
||||
async function updateMap(id, update) {
|
||||
console.log("updating", id, update);
|
||||
try {
|
||||
await database.table("maps").update(id, update);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
setMaps((prevMaps) => {
|
||||
const newMaps = [...prevMaps];
|
||||
const i = newMaps.findIndex((map) => map.id === id);
|
||||
|
Loading…
Reference in New Issue
Block a user