import User from 'assets/user.svg'; import Team from 'assets/users.svg'; import Website from 'assets/website.svg'; import classNames from 'classnames'; import Link from 'next/link'; import { useRouter } from 'next/router'; import { Icon, Item, Menu, Text } from 'react-basics'; import styles from './Nav.module.css'; import useUser from 'hooks/useUser'; export default function Nav() { const user = useUser(); const { pathname } = useRouter(); if (!user) { return null; } const handleSelect = () => {}; const items = [ { icon: , label: 'Websites', url: '/websites' }, { icon: , label: 'Users', url: '/users', hidden: !user.isAdmin }, { icon: , label: 'Teams', url: '/teams' }, { icon: , label: 'Profile', url: '/profile' }, ]; return ( {({ icon, label, url, hidden }) => !hidden && ( {icon} {label} ) } ); }