CodingContractPopup now correctly displays innerHTML, desc should be changed to return jsx though.

This commit is contained in:
Olivier Gagnon
2021-05-05 19:06:08 -04:00
parent f7c1d64033
commit cedac23dfa
2 changed files with 15 additions and 15 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ export class CodingContractPopup extends React.Component<IProps, IState>{
const contractType: CodingContractType = CodingContractTypes[this.props.c.type];
let description = [];
for (const [i, value] of contractType.desc(this.props.c.data).split('\n').entries())
description.push(<span key={i}>{value}<br/></span>);
description.push(<span key={i} dangerouslySetInnerHTML={{__html: value+'<br />'}}></span>);
return (
<div>
<CopyableText value={this.props.c.type} tag={ClickableTag.Tag_h1} />