import * as React from "react"; import { Link } from "react-router-dom"; export interface NavLinkProps { to?: string; href?: string; target?: string; onClick?(): void; } export const NavLink: React.FunctionComponent = props => { let LinkType; if (props.to) { LinkType = ( {props.children} ); } else if (props.href) { LinkType = ( {props.children} ); } return <>{LinkType}; };