import type { ComponentPropsWithoutRef, ElementType } from "react"; type RichTextProps = { content: string; as?: T; } & Omit, "as" | "content">; export function RichText({ content, as, ...props }: RichTextProps) { const Tag = (as ?? "div") as ElementType; // biome-ignore lint/security/noDangerouslySetInnerHtml: This is necessary to render rich text content coming from datasources. Make sure to sanitize the HTML content when saving it to the database using `sanitizeHTML` from `@upstart.gg/sdk` to prevent XSS attacks. return ; }