import { Box } from '@chakra-ui/react' import Link from 'next/link' import React from 'react' interface ICustomNavLinkProps { to: string children: React.ReactNode onClick?: (any) => void } const CustomNavLink: React.FunctionComponent = (props) => { const { to, children, onClick = () => {}, ...rest } = props if (to.startsWith('/')) { return ( {children} ) } return ( {children} ) } export default CustomNavLink