fix key property

This commit is contained in:
Alfred Melch 2019-12-14 19:28:11 +01:00
parent 22c34ce484
commit 74c0ed1de0

View File

@ -24,10 +24,9 @@ export const TextOutput = () => {
const isSentenceStart = sentences.includes(wordBeginning) const isSentenceStart = sentences.includes(wordBeginning)
return ( return (
<> <span key={idx}>
{isWordStart && ' '} {isWordStart && ' '}
<span <span
key={idx}
className={classNames({ className={classNames({
[styles.current]: isCurrent, [styles.current]: isCurrent,
[styles.sentenceBeginning]: isSentenceStart [styles.sentenceBeginning]: isSentenceStart
@ -35,7 +34,7 @@ export const TextOutput = () => {
> >
{segment} {segment}
</span> </span>
</> </span>
) )
})} })}
</div> </div>