import React from "react"; import { useRouter } from 'next/router'; import { Flex, Icon, useColorModeValue } from "@chakra-ui/react"; import { FiExternalLink } from "react-icons/fi"; import Tap from "animations/tap"; const Item = (props) => { const { icon, external, children, href, ...rest } = props; const { pathname } = useRouter(); const isActive = pathname === href; const borderColor = useColorModeValue("dark.800", "white"); return ( {icon && } {children} {external && } ); }; export default Item;