import React from 'react' import RichText from '../../RichText' import type { BodyProps } from '../../Body' type PodcastBodyProps = BodyProps & { showPlayer?: boolean showAccessibilityGuide?: boolean } const PodcastBody: React.FC = ({ content, richTextComponents, showPlayer = true, showAccessibilityGuide = true, }) => { if (content.__typename !== 'Audio') { return null } const podcastMediaType = 'audio/mpeg' const podcast = content.media?.find( (media) => media?.mediaType === podcastMediaType ) return (
{showPlayer && podcast?.url && (
)} {content.body?.structured && ( )}
) } export default PodcastBody