mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-05-08 08:58:38 +01:00
Remove unnecessary props from <ContactName>
This commit is contained in:
@@ -71,13 +71,7 @@ export const ContactCheckbox: FunctionComponent<PropsType> = React.memo(
|
||||
const headerName = isMe ? (
|
||||
i18n('noteToSelf')
|
||||
) : (
|
||||
<ContactName
|
||||
phoneNumber={phoneNumber}
|
||||
name={name}
|
||||
profileName={profileName}
|
||||
title={title}
|
||||
i18n={i18n}
|
||||
/>
|
||||
<ContactName title={title} />
|
||||
);
|
||||
|
||||
let messageText: ReactNode;
|
||||
|
||||
@@ -54,13 +54,7 @@ export const ContactListItem: FunctionComponent<PropsType> = React.memo(
|
||||
const headerName = isMe ? (
|
||||
i18n('noteToSelf')
|
||||
) : (
|
||||
<ContactName
|
||||
phoneNumber={phoneNumber}
|
||||
name={name}
|
||||
profileName={profileName}
|
||||
title={title}
|
||||
i18n={i18n}
|
||||
/>
|
||||
<ContactName title={title} />
|
||||
);
|
||||
|
||||
const messageText =
|
||||
|
||||
@@ -91,13 +91,7 @@ export const ConversationListItem: FunctionComponent<Props> = React.memo(
|
||||
const headerName = isMe ? (
|
||||
i18n('noteToSelf')
|
||||
) : (
|
||||
<ContactName
|
||||
phoneNumber={phoneNumber}
|
||||
name={name}
|
||||
profileName={profileName}
|
||||
title={title}
|
||||
i18n={i18n}
|
||||
/>
|
||||
<ContactName title={title} />
|
||||
);
|
||||
|
||||
let messageText: ReactNode = null;
|
||||
|
||||
@@ -62,23 +62,10 @@ const renderPerson = (
|
||||
i18n: LocalizerType,
|
||||
person: Readonly<{
|
||||
isMe?: boolean;
|
||||
name?: string;
|
||||
phoneNumber?: string;
|
||||
profileName?: string;
|
||||
title: string;
|
||||
}>
|
||||
): ReactNode =>
|
||||
person.isMe ? (
|
||||
i18n('you')
|
||||
) : (
|
||||
<ContactName
|
||||
phoneNumber={person.phoneNumber}
|
||||
name={person.name}
|
||||
profileName={person.profileName}
|
||||
title={person.title}
|
||||
i18n={i18n}
|
||||
/>
|
||||
);
|
||||
person.isMe ? i18n('you') : <ContactName title={person.title} />;
|
||||
|
||||
// This function exists because bodyRanges tells us the character position
|
||||
// where the at-mention starts at according to the full body text. The snippet
|
||||
|
||||
Reference in New Issue
Block a user