type Text = { type: 'text'; value: string; bold?: boolean; }; type Content = | { type: 'paragraph'; children: Text[] } | Text | { type: 'list'; listType: 'bullet' | 'ordered'; children: Array<{ type: 'listItem'; children: Text[] }>; } | { type: 'listItem'; children: Text[] }; const RichTextBlock = ({ block }: { block: Content }) => { if (block.type === 'text') { return block.bold ? ( {block.value} ) : ( {block.value} ); } if (block.type === 'listItem') { return block.children.map((child, index) => ); } if (block.type === 'list' && block.listType === 'ordered') { return (
    {block.children.map((child, index) => (
  1. ))}
); } return (

{block.children.map((child, index) => ( ))}

); }; const RichTextDisplay = ({ contentBlocks }: { contentBlocks: Content[] }) => { return (
{contentBlocks.map((block, index) => ( ))}
); }; export default RichTextDisplay;