import { memo } from 'react'; import type { ScriptBlock } from '../teleprompter.types'; interface ScriptBlockProps { block: ScriptBlock; registerRef: (element: HTMLElement | null) => void; } export default memo(ScriptBlockView); function ScriptBlockView({ block, registerRef }: ScriptBlockProps) { return (
{block.groupTitle &&
{block.groupTitle}
} {block.heading &&

{block.heading}

} {/* the script is user data, it is rendered as text and never as markup */}

{block.text}

); }