Skip to content

Commit

Permalink
made sidebar always visible on settings page (#5823)
Browse files Browse the repository at this point in the history
I made the sidebar/menu always visible on settings page even if the
navigationDrawerOpen is false
This aims to fix #5811
  • Loading branch information
RobertoSimonini1 authored Jun 11, 2024
1 parent b84042d commit 3440889
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -69,6 +70,7 @@ export const NavigationDrawer = ({
const isMobile = useIsMobile();
const theme = useTheme();
const isNavigationDrawerOpen = useRecoilValue(isNavigationDrawerOpenState);
const isSettingsPage = useIsSettingsPage();

const handleHover = () => {
setIsHovered(true);
Expand All @@ -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,
Expand Down

0 comments on commit 3440889

Please sign in to comment.