import { SideNav } from '@rkheftan/harmony-ui'; import { buildNavItems } from './buildNavItems'; import { appRoutes } from '@/routes/config'; import { Outlet, useLocation } from 'react-router-dom'; import { Box, useMediaQuery, useTheme } from '@mui/material'; import { Header } from './Header'; import { useState } from 'react'; import { Toolbar } from './Toolbar'; import { useAuth } from '@/hooks/useAuth'; export const Layout = () => { const navItemConfigs = buildNavItems(appRoutes); const location = useLocation(); const theme = useTheme(); const isMobile = useMediaQuery(theme.breakpoints.down('md')); const [sideNavOpen, setSideNavOpen] = useState(false); const { userInfo } = useAuth(); return ( setSideNavOpen(false)} header={isMobile ? undefined :
} footer={isMobile ?
: undefined} navConfig={navItemConfigs} activePath={location.pathname + location.hash} selectedVariant="textOnly" positioning="absolute" sideNavVariant={isMobile ? 'temporary' : 'full'} top={8.125} /> ); };