refactor: more TS code

This commit is contained in:
Tristan Yang
2022-07-04 23:13:09 +08:00
parent 627082eacb
commit e0872b1dd3
28 changed files with 56 additions and 126 deletions
+3 -3
View File
@@ -6,7 +6,7 @@ import { useDispatch, useSelector } from "react-redux";
import PinList from "./PinList";
import FavList from "../FavList";
import { useReadMessageMutation } from "../../../app/services/message";
import { updateRemeberedNavs } from "../../../app/slices/ui";
import { updateRememberedNavs } from "../../../app/slices/ui";
import useMessageFeed from "../../../common/hook/useMessageFeed";
import useConfig from "../../../common/hook/useConfig";
import ChannelIcon from "../../../common/component/ChannelIcon";
@@ -76,9 +76,9 @@ export default function ChannelChat({ cid = "", dropFiles = [] }) {
// dispatch(readMessage(msgIds));
// };
useEffect(() => {
dispatch(updateRemeberedNavs());
dispatch(updateRememberedNavs());
return () => {
dispatch(updateRemeberedNavs({ path: pathname }));
dispatch(updateRememberedNavs({ path: pathname }));
};
}, [pathname]);