refactor: add typescript support to project

This commit is contained in:
HD
2022-06-21 15:08:35 +08:00
parent 88ec2b742a
commit bd799ebea8
259 changed files with 1042 additions and 458 deletions
+1
View File
@@ -1,6 +1,7 @@
import localforage from "localforage";
import useRehydrate from "./useRehydrate";
import { KEY_UID, CACHE_VERSION } from "../config";
const tables = [
{
storeName: "channels",
@@ -1,5 +1,4 @@
import { useState } from "react";
import { useDispatch, batch } from "react-redux";
import { fullfillReactionMessage } from "../slices/message.reaction";
import { fullfillServer } from "../slices/server";
@@ -11,6 +10,7 @@ import { fullfillContacts } from "../slices/contacts";
import { fullfillFootprint } from "../slices/footprint";
import { fullfillFileMessage } from "../slices/message.file";
import { fullfillUI } from "../slices/ui";
const useRehydrate = () => {
const [iterated, setIterated] = useState(false);
const dispatch = useDispatch();
@@ -94,4 +94,5 @@ const useRehydrate = () => {
};
return { rehydrate, rehydrated: iterated };
};
export default useRehydrate;