made sidebar always visible on settings page (#5823)

I made the sidebar/menu always visible on settings page even if the
navigationDrawerOpen is false
This aims to fix #5811
This commit is contained in:
RobertoSimonini1
2024-06-11 17:39:51 +02:00
committed by GitHub
parent b84042ddbb
commit 3440889ad0

View File

@ -5,6 +5,7 @@ import { motion } from 'framer-motion';
import { useRecoilValue } from 'recoil';
import { MOBILE_VIEWPORT } from 'twenty-ui';
import { useIsSettingsPage } from '@/navigation/hooks/useIsSettingsPage';
import { isNavigationDrawerOpenState } from '@/ui/navigation/states/isNavigationDrawerOpenState';
import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile';
@ -69,6 +70,7 @@ export const NavigationDrawer = ({
const isMobile = useIsMobile();
const theme = useTheme();
const isNavigationDrawerOpen = useRecoilValue(isNavigationDrawerOpenState);
const isSettingsPage = useIsSettingsPage();
const handleHover = () => {
setIsHovered(true);
@ -90,7 +92,7 @@ export const NavigationDrawer = ({
initial={false}
animate={{
width: isMobile ? mobileWidth : desktopWidth,
opacity: isNavigationDrawerOpen ? 1 : 0,
opacity: isNavigationDrawerOpen || isSettingsPage ? 1 : 0,
}}
transition={{
duration: theme.animation.duration.normal,