Skip to content

Commit c3245ce

Browse files
Fix ChannelList key issue (JSX error)
1 parent dc2831e commit c3245ce

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/components/ChannelList/ChannelList.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,13 +358,12 @@ const UnMemoizedChannelList = (props: ChannelListProps) => {
358358
// forces the update of preview component on channel update
359359
channelUpdateCount,
360360
getLatestMessagePreview,
361-
key: item.cid,
362361
Preview,
363362
setActiveChannel,
364363
watchers,
365364
};
366365

367-
return <ChannelPreview {...previewProps} />;
366+
return <ChannelPreview key={item.cid} {...previewProps} />;
368367
};
369368

370369
const baseClass = 'str-chat__channel-list';

0 commit comments

Comments
 (0)