diff --git a/ts/components/basic/I18n.tsx b/ts/components/basic/I18n.tsx index c248a41ff..5b29dcb71 100644 --- a/ts/components/basic/I18n.tsx +++ b/ts/components/basic/I18n.tsx @@ -42,7 +42,7 @@ export const I18n = (props: I18nProps) => { /** If the string contains a relevant formatting tag, render it as HTML */ if (i18nString.match(formattingTagRegex)) { - return ; + return ; } const Comp = props.as ?? React.Fragment; diff --git a/ts/components/basic/SessionHTMLRenderer.tsx b/ts/components/basic/SessionHTMLRenderer.tsx index 83c0c46ea..2a057a48a 100644 --- a/ts/components/basic/SessionHTMLRenderer.tsx +++ b/ts/components/basic/SessionHTMLRenderer.tsx @@ -3,18 +3,18 @@ import React from 'react'; type ReceivedProps = { html: string; - as?: React.ElementType; + tag?: React.ElementType; key?: any; className?: string; }; -export const SessionHtmlRenderer = ({ as = 'div', key, html, className }: ReceivedProps) => { +export const SessionHtmlRenderer = ({ tag = 'div', key, html, className }: ReceivedProps) => { const clean = DOMPurify.sanitize(html, { USE_PROFILES: { html: true }, FORBID_ATTR: ['script'], }); - return React.createElement(as, { + return React.createElement(tag, { key, className,