From 4becc9a144438f4e9fbf4088d32802329f234e57 Mon Sep 17 00:00:00 2001 From: Saahith Janapati Date: Mon, 24 Jul 2023 14:59:10 -0400 Subject: [PATCH] hopefully this time? --- test-site/src/components/HTMLExampleCard.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/test-site/src/components/HTMLExampleCard.tsx b/test-site/src/components/HTMLExampleCard.tsx index a3268577f..329afb267 100644 --- a/test-site/src/components/HTMLExampleCard.tsx +++ b/test-site/src/components/HTMLExampleCard.tsx @@ -20,7 +20,7 @@ interface CustomRawDataType { [htmlFieldName]: { html: string } } -function renderHTMLContent(htmlContent: {__html: string} | undefined) { +function renderHTMLContent(htmlContent: { __html: string } | undefined) { if ( htmlContent ) { return
; @@ -36,15 +36,13 @@ export function HTMLExampleCard(props: CardProps): JSX.Elemen cardFeedbackCallback('THUMBS_UP'); }, [cardFeedbackCallback]); - const htmlContent = useMemo(() => - {return {__html: result.rawData?.[htmlFieldName]?.html}}, [result.rawData?.[htmlFieldName]?.html]); + const html: string = result.rawData?.[htmlFieldName]?.html; + const htmlContent = useMemo(() => { return { __html: html }; }, [html]); return (

HTML Card

- - {renderHTMLContent(htmlContent)}