Remove unnecessary props from <ContactName>

This commit is contained in:
Evan Hahn 2021-09-16 11:15:43 -05:00 committed by GitHub
parent 43685d15c6
commit eed7aff925
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
42 changed files with 57 additions and 423 deletions

View file

@ -17,9 +17,6 @@ import { getCustomColorStyle } from '../../util/getCustomColorStyle';
export type Props = {
authorTitle: string;
authorPhoneNumber?: string;
authorProfileName?: string;
authorName?: string;
conversationColor: ConversationColorType;
customColor?: CustomColorType;
bodyRanges?: BodyRangesType;
@ -372,15 +369,7 @@ export class Quote extends React.Component<Props, State> {
}
public renderAuthor(): JSX.Element {
const {
authorProfileName,
authorPhoneNumber,
authorTitle,
authorName,
i18n,
isFromMe,
isIncoming,
} = this.props;
const { authorTitle, i18n, isFromMe, isIncoming } = this.props;
return (
<div
@ -389,17 +378,7 @@ export class Quote extends React.Component<Props, State> {
isIncoming ? 'module-quote__primary__author--incoming' : null
)}
>
{isFromMe ? (
i18n('you')
) : (
<ContactName
phoneNumber={authorPhoneNumber}
name={authorName}
profileName={authorProfileName}
title={authorTitle}
i18n={i18n}
/>
)}
{isFromMe ? i18n('you') : <ContactName title={authorTitle} />}
</div>
);
}