Skip to content

Commit

Permalink
fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
saahithjanapati committed Jul 24, 2023
1 parent acdf389 commit 64f3ea8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions test-site/src/components/HTMLExampleCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@ const htmlFieldName = 'c_richTextV2Data';
interface CustomRawDataType {
name: string,
description: string,
[htmlFieldName]: any
[htmlFieldName]: { html: string }
}

function renderHTMLContent(HTMLContent: string | undefined) {
if ( HTMLContent )
{
return <div className="reset-style" dangerouslySetInnerHTML={{ __html: HTMLContent }} />;
const createDangerousHTMLObject = (htmlContent: string) => ({ __html: htmlContent });
const dangerouslySetHTML = createDangerousHTMLObject(HTMLContent);
return <div className="reset-style" dangerouslySetInnerHTML={dangerouslySetHTML} />;
}
return null;
}
Expand Down
2 changes: 1 addition & 1 deletion test-site/src/components/MarkdownExampleCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const markdownFieldName = 'c_markdownData';
interface CustomRawDataType {
name: string,
description: string,
[markdownFieldName]: any
[markdownFieldName]: { markdown: string }
}

export function MarkdownExampleCard(props: CardProps<CustomRawDataType>): JSX.Element {
Expand Down

0 comments on commit 64f3ea8

Please sign in to comment.