/**
 * Body copy from the API.
 *
 * Already processed by the backend's RichText::paragraphs() and already
 * sanitised there — the frontend deliberately does not reimplement paragraph
 * handling, because a second implementation is a second thing to drift.
 *
 * The HTML originates from editor fields in the admin panel, which is the same
 * trust boundary the Blade layer applied to the same values.
 */
export default function RichText({ html, className }: { html?: string | null; className?: string }) {
  if (!html) {
    return null;
  }

  return <div className={className ?? "rich-body"} dangerouslySetInnerHTML={{ __html: html }} />;
}
