Remove unsafe assignment to innerHTML

This commit is contained in:
Arkadiusz Wieczorek 2022-01-29 17:40:47 +01:00
parent 627c8790b3
commit c284451e9e

View File

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