[Refactor] Change the function names.
This commit is contained in:
1 parent
b4d164e116
commit
e1d8f59890
45 files changed
+230
-191
No files matched your search
+4
-4
@@ -1,18 +1,18 @@
|
||||
import clsx from "clsx";
|
||||
import styles from "./SidebarCompactModeButton.module.scss";
|
||||
|
||||
import { useMainPageCompactModeStatus } from "@store";
|
||||
import { useStore_IsMainPageCompactMode } from "@store";
|
||||
import ArrowLeftSvg from "@images/arrow_left.svg?react";
|
||||
|
||||
export const SidebarCompactModeButton = () => {
|
||||
const { updateMainPageCompactModeStatus, currentMainPageCompactModeStatus } = useMainPageCompactModeStatus();
|
||||
const { updateIsMainPageCompactMode, currentIsMainPageCompactMode } = useStore_IsMainPageCompactMode();
|
||||
|
||||
const toggleCompactMode = () => {
|
||||
updateMainPageCompactModeStatus(!currentMainPageCompactModeStatus);
|
||||
updateIsMainPageCompactMode(!currentIsMainPageCompactMode);
|
||||
};
|
||||
|
||||
const class_names = clsx(styles["arrow_left_svg"], {
|
||||
[styles["reverse"]]: currentMainPageCompactModeStatus
|
||||
[styles["reverse"]]: currentIsMainPageCompactMode
|
||||
});
|
||||
|
||||
return (
|
||||
|
||||
Reference in new issue
Block a user