import Linkify from 'linkify-react'; import type { FunctionComponent } from 'react'; import React from 'react'; interface ISubjectRenderProps { subject: string; onLinkClick: (href: string) => any; } export const SubjectRender: FunctionComponent = ({ subject, onLinkClick, }) => { return ( { const href = (event.target as any)?.href; onLinkClick(href); }, }, }} > {subject} ); };