From 44194451f877d0d8743781e354c6876555ef7aaa Mon Sep 17 00:00:00 2001 From: subnub Date: Tue, 2 Jul 2024 02:52:23 -0400 Subject: [PATCH] mobile impreovments --- src/components/LeftSection/index.jsx | 32 ++++++++++++++++++++++++---- src/hooks/utils.ts | 6 +++++- src/icons/SettingsIcon.tsx | 15 +++++++++++++ 3 files changed, 48 insertions(+), 5 deletions(-) create mode 100644 src/icons/SettingsIcon.tsx diff --git a/src/components/LeftSection/index.jsx b/src/components/LeftSection/index.jsx index 3f1b26d..81e8323 100644 --- a/src/components/LeftSection/index.jsx +++ b/src/components/LeftSection/index.jsx @@ -11,11 +11,12 @@ import classNames from "classnames"; import PhotoIcon from "../../icons/PhotoIcon"; import { useAppDispatch, useAppSelector } from "../../hooks/store"; import { closeDrawer } from "../../reducers/leftSection"; +import SettingsIcon from "../../icons/SettingsIcon"; const LeftSection = (props) => { const [isDropdownOpen, setIsDropdownOpen] = useState(false); const leftSectionOpen = useAppSelector((state) => state.leftSection.drawOpen); - const { isHome, isTrash, isMedia } = useUtils(); + const { isHome, isTrash, isMedia, isSettings } = useUtils(); const dispatch = useAppDispatch(); const navigate = useNavigate(); const addNewDisabled = useRef(false); @@ -47,6 +48,11 @@ const LeftSection = (props) => { navigate("/media"); }; + const goSettings = () => { + dispatch(closeDrawer()); + navigate("/settings"); + }; + const closeDrawerEvent = useCallback( (e) => { console.log("close", e?.target.id); @@ -97,7 +103,7 @@ const LeftSection = (props) => { )} -
+
-
+
-
+
+ +
+