import { ReactNode } from "react"; import { Link as LinkRouter } from "react-router-dom"; export function MwLink(props: { children?: ReactNode; to?: string; url?: string; onClick?: () => void; }) { const isExternal = !!props.url; const isInternal = !!props.to; const content = ( {props.children} ); if (isExternal) return {content}; if (isInternal) return {content}; return ( props.onClick && props.onClick()}>{content} ); }