Remove unsafe assignment to innerHTML

This commit is contained in:
Arkadiusz Wieczorek 2022-01-29 17:40:47 +01:00
parent 627c8790b3
commit c284451e9e
1 changed files with 4 additions and 6 deletions

View File

@ -44,6 +44,8 @@ function ClusterRangeSummary({ cluster }: { cluster: RequestCluster }) {
}
function Placeholder({ children }: { children: string }) {
const invisbleCharacter = '';
return (
<span
style={{
@ -54,13 +56,9 @@ function Placeholder({ children }: { children: string }) {
bottom: '3px',
}}
>
<span
dangerouslySetInnerHTML={{ __html: '&nbsp;'.repeat(12) }}
></span>
<span>{invisbleCharacter.repeat(6)}</span>
<span style={{ color: 'gray' }}>({children})</span>
<span
dangerouslySetInnerHTML={{ __html: '&nbsp;'.repeat(12) }}
></span>
<span>{invisbleCharacter.repeat(6)}</span>
</span>
);
}