Add on upgrade listener for DB and overlay when upgrading

This commit is contained in:
Mitchell McCaffrey
2021-06-24 16:14:20 +10:00
parent 110a6bdd1f
commit 72f2c74e9d
28 changed files with 302 additions and 143 deletions

View File

@@ -1,6 +1,6 @@
import React, { useEffect, useState, useContext, useCallback } from "react";
import { useAuth } from "./AuthContext";
import { useUserId } from "./UserIdContext";
import { useDatabase } from "./DatabaseContext";
import { applyObservableChange } from "../helpers/dexie";
@@ -19,7 +19,7 @@ const defaultMapState = {
export function MapDataProvider({ children }) {
const { database, databaseStatus } = useDatabase();
const { userId } = useAuth();
const userId = useUserId();
const [maps, setMaps] = useState([]);
const [mapStates, setMapStates] = useState([]);