import { Fragment } from 'react' ; import Markdown from 'react-markdown' ; import { default as LinkApp } from './LinkApp' ; interface Props { source : string ; } const Link = ( props ) => < LinkApp isExternal = { true } { ... props } />; const disallowed = [ 'html' ] ; const components = { a : Link , p : Fragment } ; const TranslateMarkdown = ( { source } ) => { return ( < Markdown disallowedElements = { disallowed } components = { components } > { source } < /Markdown>); } ; export default TranslateMarkdown ;