import classNames from 'classnames' import Link from 'next/link' import { AnchorHTMLAttributes, DetailedHTMLProps } from 'react' type ButtonLinkProps = { children: string } & DetailedHTMLProps< AnchorHTMLAttributes, HTMLAnchorElement > const ButtonLink: React.FC = ({ children, className, href, target, }) => { const isExternal = href?.indexOf('//') !== -1 const inner = ( {children} ) if (isExternal || !href) { return inner } return ( {inner} ) } export const ButtonLinkPatreon: React.FC = ({ children }) => { return ( {children} ) } export default ButtonLink