refactor: add batch insert into indexDB

This commit is contained in:
Tristan Yang
2023-03-10 14:33:36 +08:00
parent 928db8f1fa
commit 0cd7c1e9dd
6 changed files with 105 additions and 35 deletions
+4 -1
View File
@@ -1,7 +1,10 @@
import localforage from "localforage";
import * as localforage from "localforage";
import { extendPrototype } from 'localforage-setitems';
import useRehydrate from "./useRehydrate";
import { KEY_UID, CACHE_VERSION } from "../config";
extendPrototype(localforage);
const tables = [
{
storeName: "channels",