()
| 8 | import GuestModeNotice from './GuestModeNotice' |
| 9 | |
| 10 | function Navbar() { |
| 11 | const [isDrawerOpen, setIsDrawerOpen] = useState(false) |
| 12 | const { isGuest } = useAuthContext() |
| 13 | |
| 14 | return ( |
| 15 | <> |
| 16 | <Flex |
| 17 | as="nav" |
| 18 | position="fixed" |
| 19 | top="0" |
| 20 | left="0" |
| 21 | right="0" |
| 22 | px="4" |
| 23 | py="2" |
| 24 | align="center" |
| 25 | zIndex="1000" |
| 26 | pointerEvents="none" |
| 27 | justifyContent="space-between" |
| 28 | > |
| 29 | <Link to="/collections" style={{ pointerEvents: 'auto' }}> |
| 30 | <IconButton variant="ghost" aria-label="Home" size="md" _hover={{ bg: 'none' }}> |
| 31 | <Image width="3rem" src={Logo} alt="Logo" /> |
| 32 | </IconButton> |
| 33 | </Link> |
| 34 | |
| 35 | {isGuest && <GuestModeNotice />} |
| 36 | |
| 37 | <IconButton |
| 38 | variant="ghost" |
| 39 | aria-label="Menu" |
| 40 | size="md" |
| 41 | onClick={() => setIsDrawerOpen(true)} |
| 42 | style={{ pointerEvents: 'auto' }} |
| 43 | _hover={{ bg: 'none' }} |
| 44 | > |
| 45 | <FiMenu size="1.5rem" /> |
| 46 | </IconButton> |
| 47 | </Flex> |
| 48 | <Drawer isOpen={isDrawerOpen} setIsOpen={setIsDrawerOpen} /> |
| 49 | </> |
| 50 | ) |
| 51 | } |
| 52 | |
| 53 | export default Navbar |
nothing calls this directly
no test coverage detected