refactor: add typescript support to project
This commit is contained in:
@@ -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;
|
||||
Reference in New Issue
Block a user