more logging
This commit is contained in:
parent
2e5d52b6ac
commit
b91d0e4157
@ -131,6 +131,7 @@ export function MapDataProvider({ children }) {
|
||||
}
|
||||
|
||||
async function updateMap(id, update) {
|
||||
console.log("updating", update);
|
||||
await database.table("maps").update(id, update);
|
||||
setMaps((prevMaps) => {
|
||||
const newMaps = [...prevMaps];
|
||||
@ -140,6 +141,7 @@ export function MapDataProvider({ children }) {
|
||||
}
|
||||
return newMaps;
|
||||
});
|
||||
console.log("updated");
|
||||
}
|
||||
|
||||
async function updateMaps(ids, update) {
|
||||
@ -176,6 +178,7 @@ export function MapDataProvider({ children }) {
|
||||
* @param {Object} map the map to put
|
||||
*/
|
||||
async function putMap(map) {
|
||||
console.log("putting", map);
|
||||
await database.table("maps").put(map);
|
||||
setMaps((prevMaps) => {
|
||||
const newMaps = [...prevMaps];
|
||||
@ -190,6 +193,7 @@ export function MapDataProvider({ children }) {
|
||||
if (map.owner !== userId) {
|
||||
await updateCache();
|
||||
}
|
||||
console.log("map put");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -85,7 +85,6 @@ function Game() {
|
||||
// Join game
|
||||
useEffect(() => {
|
||||
if (databaseStatus !== "loading") {
|
||||
console.log("join", databaseStatus);
|
||||
session.joinParty(gameId, password);
|
||||
}
|
||||
}, [gameId, password, databaseStatus]);
|
||||
|
Loading…
Reference in New Issue
Block a user