'use client'; import { useEffect } from 'react'; // @mui import Box from '@mui/material/Box'; import Stack from '@mui/material/Stack'; import Drawer from '@mui/material/Drawer'; // hooks import { useResponsive } from 'src/hooks/use-responsive'; import { useAuthContext } from 'src/auth/hooks'; // components import Logo from 'src/components/logo'; import Scrollbar from 'src/components/scrollbar'; import { usePathname } from 'src/routes/hooks'; import { NavSectionVertical } from 'src/components/nav-section'; // import { NAV } from '../config-layout'; import { useNavData } from './config-navigation'; import { NavToggleButton } from '../_common'; // ---------------------------------------------------------------------- type Props = { openNav: boolean; onCloseNav: VoidFunction; }; export default function NavVertical({ openNav, onCloseNav }: Props) { const { user } = useAuthContext(); const pathname = usePathname(); const lgUp = useResponsive('up', 'lg'); const navData = useNavData(); useEffect(() => { if (openNav) { onCloseNav(); } // eslint-disable-next-line react-hooks/exhaustive-deps }, [pathname]); const renderContent = ( {/* */} ); return ( {lgUp ? ( `dashed 1px ${theme.palette.divider}`, }} > {renderContent} ) : ( {renderContent} )} ); }