refactor: useSelector

This commit is contained in:
Tristan Yang
2023-08-29 11:33:23 +08:00
parent 647bae7116
commit fe10a1c374
116 changed files with 572 additions and 661 deletions
+5 -1
View File
@@ -10,11 +10,15 @@ import {
useUpdateSystemCommonMutation
} from "../../../app/services/server";
import { useAppSelector } from "../../../app/store";
import { shallowEqual } from "react-redux";
// type Props = {}
const Index = () => {
const currStatus = useAppSelector((store) => !!store.server.show_user_online_status);
const currStatus = useAppSelector(
(store) => !!store.server.show_user_online_status,
shallowEqual
);
const { t } = useTranslation("setting", { keyPrefix: "overview.online_status" });
const { t: ct } = useTranslation();
const { refetch } = useGetSystemCommonQuery();