import { cn } from "../../lib/utils" import { looksLikeHtml, stripHtml } from "../../lib/richText" export interface RichTextContentProps { html?: string | null className?: string emptyLabel?: string } export function RichTextContent({ html, className, emptyLabel = "—", }: RichTextContentProps) { const trimmed = html?.trim() ?? "" if (!trimmed) { return {emptyLabel} } if (looksLikeHtml(trimmed)) { return (
) } return {stripHtml(trimmed)} }