import React, { PropsWithChildren } from 'react' import { StructuredTreeFragment } from '@financial-times/cp-content-pipeline-client' import RichText from '../RichText' import { ContentProps } from '../types' import * as ComponentWorkarounds from '../content-tree/Workarounds' type BylineProps = { showEditedBy: boolean structuredContent: StructuredTreeFragment } interface AuthorLinkProps extends ContentProps {} const AuthorLink: React.FC> = (props) => props.content.concept ? ( {props.children} ) : null const bylineComponents = { author: AuthorLink, } const Byline: React.FC = ({ structuredContent, showEditedBy }) => { return (

{showEditedBy && ( Edited by
)} {typeof structuredContent === 'string' ? ( <>{structuredContent} ) : ( )}

) } export default Byline