diff --git a/packages/twenty-front/src/modules/ui/layout/page/components/DefaultLayout.tsx b/packages/twenty-front/src/modules/ui/layout/page/components/DefaultLayout.tsx index 45affd9dc7e..61164301285 100644 --- a/packages/twenty-front/src/modules/ui/layout/page/components/DefaultLayout.tsx +++ b/packages/twenty-front/src/modules/ui/layout/page/components/DefaultLayout.tsx @@ -9,10 +9,8 @@ import { LayoutCustomizationBar } from '@/layout-customization/components/Layout import { AppNavigationDrawer } from '@/navigation/components/AppNavigationDrawer'; import { MobileNavigationBar } from '@/navigation/components/MobileNavigationBar'; import { PageDragDropProvider } from '@/navigation-menu-item/display/dnd/providers/PageDragDropProvider'; -import { useIsSettingsPage } from '@/navigation/hooks/useIsSettingsPage'; -import { OBJECT_SETTINGS_WIDTH } from '@/settings/data-model/constants/ObjectSettings'; import { SignInAppNavigationDrawerMock } from '@/sign-in-background-mock/components/SignInAppNavigationDrawerMock'; -import { Suspense, lazy, useContext } from 'react'; +import { Suspense, lazy } from 'react'; const SignInBackgroundMockPage = lazy(() => import('@/sign-in-background-mock/components/SignInBackgroundMockPage').then( @@ -21,13 +19,11 @@ const SignInBackgroundMockPage = lazy(() => ); import { useShowFullscreen } from '@/ui/layout/fullscreen/hooks/useShowFullscreen'; import { useShowAuthModal } from '@/ui/layout/hooks/useShowAuthModal'; -import { NAVIGATION_DRAWER_CONSTRAINTS } from '@/ui/layout/resizable-panel/constants/NavigationDrawerConstraints'; import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile'; import { styled } from '@linaria/react'; -import { AnimatePresence, LayoutGroup, motion } from 'framer-motion'; +import { AnimatePresence, LayoutGroup } from 'framer-motion'; import { Outlet } from 'react-router-dom'; -import { useScreenSize } from 'twenty-ui/utilities'; -import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants'; +import { themeCssVariables } from 'twenty-ui/theme-constants'; const StyledLayout = styled.div` background: ${themeCssVariables.background.noisy}; display: flex; @@ -43,13 +39,12 @@ const StyledLayout = styled.div` } `; -const StyledPageContainerBase = styled.div` +const StyledPageContainer = styled.div` display: flex; flex: 1 1 auto; flex-direction: row; min-height: 0; `; -const StyledPageContainer = motion.create(StyledPageContainerBase); const StyledNavigationDrawerWrapper = styled.div` flex-shrink: 0; @@ -63,11 +58,8 @@ const StyledMainContainer = styled.div` export const DefaultLayout = () => { const isMobile = useIsMobile(); - const isSettingsPage = useIsSettingsPage(); - const windowsWidth = useScreenSize().width; const showAuthModal = useShowAuthModal(); const useShowFullScreen = useShowFullscreen(); - const { theme } = useContext(ThemeContext); return ( <> @@ -76,21 +68,7 @@ export const DefaultLayout = () => { - + {!showAuthModal && } {showAuthModal ? (