import React from 'react'; import { useRouter } from 'next/router'; import Icon from '../Icon'; import { Flex, Drawer, DrawerBody, DrawerFooter, DrawerOverlay, DrawerContent, Box, useDisclosure, Button, Image } from '@chakra-ui/react'; const NavbarPhone = ({ navbarList }: { navbarList: { label: string; icon: string; link: string; activeLink: string[]; }[]; }) => { const router = useRouter(); const { isOpen, onClose, onOpen } = useDisclosure(); return ( <> {/* */} {navbarList.map((item) => ( { router.push(item.link); onClose(); }} cursor={'pointer'} h={'60px'} borderRadius={'md'} {...(item.activeLink.includes(router.pathname) ? { color: '#2B6CB0', backgroundColor: '#BEE3F8' } : { color: '#4A5568', backgroundColor: 'transparent' })} > {item.label} ))} ); }; export default NavbarPhone;