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) =>
{block.children.map((child, index) => (