import { FocusableItem, Menu, MenuDivider, MenuItem } from '@szhsin/react-menu'; import { useSnapshot } from 'valtio'; import { api } from '../utils/api'; import states from '../utils/states'; import Icon from './icon'; import Link from './link'; function NavMenu(props) { const snapStates = useSnapshot(states); const { instance, authenticated } = api(); return ( } > Home {authenticated && ( <> Notifications {snapStates.notificationsShowNew && ( {' '} • )} Lists Followed Hashtags Bookmarks Favourites )} Search Local Federated {authenticated && ( <> { states.showSettings = true; }} > Settings )} ); } function MenuLink(props) { return ( {({ ref, closeMenu }) => ( closeMenu(detail === 0 ? 'Enter' : undefined) } /> )} ); } export default NavMenu;