more logging

This commit is contained in:
Mitchell McCaffrey 2020-10-23 23:18:57 +11:00
parent 2e5d52b6ac
commit b91d0e4157
2 changed files with 4 additions and 1 deletions

View File

@ -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");
}
/**

View File

@ -85,7 +85,6 @@ function Game() {
// Join game
useEffect(() => {
if (databaseStatus !== "loading") {
console.log("join", databaseStatus);
session.joinParty(gameId, password);
}
}, [gameId, password, databaseStatus]);