import Logo from '@/assets/logo.svg' import { AccountBox, HomeOutlined, ListAltRounded, Logout, MenuRounded, Message, SettingsOutlined, ShareOutlined, Widgets, } from '@mui/icons-material' import { Box, Drawer, IconButton, List, ListItemButton, ListItemContent, ListItemDecorator, Typography, } from '@mui/joy' import { useState } from 'react' import { useLocation } from 'react-router-dom' import { version } from '../../../package.json' import NavBarLink from './NavBarLink' const links = [ { to: '/my/chores', label: 'Home', icon: , }, { to: '/chores', label: 'Desktop View', icon: , }, { to: '/things', label: 'Things', icon: , }, { to: '/settings#sharing', label: 'Sharing', icon: , }, { to: '/settings#notifications', label: 'Notifications', icon: , }, { to: '/settings#account', label: 'Account', icon: , }, { to: '/settings', label: 'Settings', icon: , }, ] const NavBar = () => { const [drawerOpen, setDrawerOpen] = useState(false) const [openDrawer, closeDrawer] = [ () => setDrawerOpen(true), () => setDrawerOpen(false), ] const location = useLocation() // if url has /landing then remove the navbar: if ( ['/signup', '/login', '/landing', '/forgot-password'].includes( location.pathname, ) ) { return null } if ( location.pathname === '/' && import.meta.env.VITE_IS_LANDING_DEFAULT === 'true' ) { return null } return ( ) } export default NavBar