diff --git a/frontend/src/component/layout/MainLayout/MainLayout.tsx b/frontend/src/component/layout/MainLayout/MainLayout.tsx index 32043b7494..8ad5e40b59 100644 --- a/frontend/src/component/layout/MainLayout/MainLayout.tsx +++ b/frontend/src/component/layout/MainLayout/MainLayout.tsx @@ -18,6 +18,7 @@ import { NavigationSidebar } from './NavigationSidebar/NavigationSidebar'; import { MainLayoutEventTimeline } from './MainLayoutEventTimeline'; import { EventTimelineProvider } from 'component/events/EventTimeline/EventTimelineProvider'; import { AIChat } from 'component/ai/AIChat'; +import { NewInUnleash } from './NavigationSidebar/NewInUnleash/NewInUnleash'; interface IMainLayoutProps { children: ReactNode; @@ -124,7 +125,11 @@ export const MainLayout = forwardRef( > } + show={ + + } /> void }> = ({ - onClick, -}) => { +export const MobileNavigationSidebar: FC<{ + onClick: () => void; + NewInUnleash?: typeof NewInUnleash; +}> = ({ onClick, NewInUnleash }) => { const { routes } = useRoutes(); return ( <> - + {NewInUnleash ? : null} ({ borderTop: `1px solid ${theme.palette.divider}`, })); -export const NavigationSidebar = () => { +export const NavigationSidebar: FC<{ NewInUnleash?: typeof NewInUnleash }> = ({ + NewInUnleash, +}) => { const { routes } = useRoutes(); const [mode, setMode] = useNavigationMode(); @@ -154,10 +157,12 @@ export const NavigationSidebar = () => { - setMode('full')} - /> + {NewInUnleash ? ( + setMode('full')} + /> + ) : null} { diff --git a/frontend/src/component/layout/MainLayout/NavigationSidebar/NewInUnleash/NewInUnleash.tsx b/frontend/src/component/layout/MainLayout/NavigationSidebar/NewInUnleash/NewInUnleash.tsx index d60229a44c..d07b601d13 100644 --- a/frontend/src/component/layout/MainLayout/NavigationSidebar/NewInUnleash/NewInUnleash.tsx +++ b/frontend/src/component/layout/MainLayout/NavigationSidebar/NewInUnleash/NewInUnleash.tsx @@ -89,13 +89,11 @@ type NewItem = { interface INewInUnleashProps { mode?: NavigationMode; - onItemClick?: () => void; onMiniModeClick?: () => void; } export const NewInUnleash = ({ mode = 'full', - onItemClick, onMiniModeClick, }: INewInUnleashProps) => { const navigate = useNavigate(); diff --git a/frontend/src/component/menu/Header/DrawerMenu/DrawerMenu.tsx b/frontend/src/component/menu/Header/DrawerMenu/DrawerMenu.tsx index 12c4ed20df..e1fb47ef10 100644 --- a/frontend/src/component/menu/Header/DrawerMenu/DrawerMenu.tsx +++ b/frontend/src/component/menu/Header/DrawerMenu/DrawerMenu.tsx @@ -8,6 +8,7 @@ import styles from './DrawerMenu.module.scss'; // FIXME: useStyle - theme import theme from 'themes/theme'; import { ThemeMode } from 'component/common/ThemeMode/ThemeMode'; import { MobileNavigationSidebar } from 'component/layout/MainLayout/NavigationSidebar/NavigationSidebar'; +import { NewInUnleash } from 'component/layout/MainLayout/NavigationSidebar/NewInUnleash/NewInUnleash'; const StyledDrawerHeader = styled('div')(({ theme }) => ({ display: 'flex', @@ -71,7 +72,10 @@ export const DrawerMenu: VFC = ({ - + );