'use client' import { Container } from '@byline/ui/react' import cx from 'clsx' import type { RichTextBlockData } from '@byline/generated-types' import { LexicalRichText } from '@/ui/byline/components/richtext-lexical' import type { Locale } from '@/ui/byline/types/i18n' interface Props { id: string block: RichTextBlockData lng: Locale constrainedLayout?: boolean className?: string } export function RichTextBlock({ id, block, lng, className, constrainedLayout, }: Props): React.JSX.Element { // TODO: richText is a Lexical richText field — type properly once the // Lexical node shape is modelled in @byline/core. const content = block.richText as Record | undefined const constrainedWidth = block.constrainedWidth return (
) }