From b8ac40ae55a169dc9c27cabeaeb1fe5e21f99f2f Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 15 Jul 2021 11:49:44 +0100 Subject: [PATCH] Fix React missing key error --- src/components/views/rooms/EventTile.tsx | 31 ++++++++++++------------ 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/src/components/views/rooms/EventTile.tsx b/src/components/views/rooms/EventTile.tsx index b5a4bc41db..14eab5da2e 100644 --- a/src/components/views/rooms/EventTile.tsx +++ b/src/components/views/rooms/EventTile.tsx @@ -1152,11 +1152,11 @@ export default class EventTile extends React.Component { "aria-live": ariaLive, "aria-atomic": true, "data-scroll-tokens": scrollToken, - }, [ - ircTimestamp, - avatar, - sender, - ircPadlock, + }, <> + { ircTimestamp } + { avatar } + { sender } + { ircPadlock }
{ groupTimestamp } { groupPadlock } @@ -1169,8 +1169,8 @@ export default class EventTile extends React.Component { replacingEventId={this.props.replacingEventId} showUrlPreview={false} /> -
, - ]); + + ); } default: { const thread = ReplyThread.makeThread( @@ -1193,10 +1193,10 @@ export default class EventTile extends React.Component { "data-scroll-tokens": scrollToken, "onMouseEnter": () => this.setState({ hover: true }), "onMouseLeave": () => this.setState({ hover: false }), - }, [ - ircTimestamp, - sender, - ircPadlock, + }, <> + { ircTimestamp } + { sender } + { ircPadlock }
{ groupTimestamp } { groupPadlock } @@ -1214,11 +1214,10 @@ export default class EventTile extends React.Component { { keyRequestInfo } { reactionsRow } { actionBar } -
, - msgOption, - avatar, - - ]) + + { msgOption } + { avatar } + ) ); } }