remove index as key

pull/1783/head
Audric Ackermann 4 years ago
parent 97b9156562
commit 4fbb0d48f2
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -178,7 +178,7 @@ const InviteContactsDialogInner = (props: Props) => {
return members.map((member: ContactType, index: number) => (
<SessionMemberListItem
member={member}
key={index}
key={member.id}
index={index}
isSelected={selectedContacts.some(m => m === member.id)}
onSelect={(selectedMember: ContactType) => {

@ -102,7 +102,7 @@ export class RemoveModeratorsDialog extends React.Component<Props, State> {
return members.map((member: ContactType, index: number) => (
<SessionMemberListItem
member={member}
key={index}
key={member.id}
index={index}
isSelected={selectedContacts.some(m => m === member.id)}
onSelect={(selectedMember: ContactType) => {

@ -128,7 +128,7 @@ const LeftPaneBottomButtons = () => {
const showRecoveryPhrase = window.i18n('showRecoveryPhrase');
return (
<div className="left-pane-setting-bottom-buttons">
<div className="left-pane-setting-bottom-buttons" key={1}>
<SessionButton
text={dangerButtonText}
buttonType={SessionButtonType.SquareOutline}

@ -423,6 +423,7 @@ export class SessionCompositionBox extends React.Component<Props, State> {
<SessionMemberListItem
isSelected={focused}
index={index++}
key={suggestion.id}
member={{
id: `${suggestion.id}`,
authorPhoneNumber: `${suggestion.id}`,

@ -169,7 +169,6 @@ export interface ConversationType {
name?: string;
profileName?: string;
hasNickname: boolean;
index?: number;
activeAt?: number;
lastMessage?: LastMessageType;

@ -121,8 +121,6 @@ export const _getLeftPaneLists = (
};
}
// conversation.index = index;
// Add Open Group to list as soon as the name has been set
if (conversation.isPublic && (!conversation.name || conversation.name === 'Unknown group')) {
continue;

Loading…
Cancel
Save