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

@ -16,7 +16,7 @@ export type Props = {
i18n: LocalizerType;
firstName?: string;
onAccept(): unknown;
} & Omit<ContactNameProps, 'module' | 'i18n'> &
} & Omit<ContactNameProps, 'module'> &
Pick<
MessageRequestActionsConfirmationProps,
'conversationType' | 'onBlock' | 'onBlockAndReportSpam' | 'onDelete'
@ -26,13 +26,10 @@ export const MandatoryProfileSharingActions = ({
conversationType,
firstName,
i18n,
name,
onAccept,
onBlock,
onBlockAndReportSpam,
onDelete,
phoneNumber,
profileName,
title,
}: Props): JSX.Element => {
const [mrState, setMrState] = React.useState(MessageRequestState.default);
@ -50,9 +47,6 @@ export const MandatoryProfileSharingActions = ({
);
}}
onDelete={onDelete}
name={name}
profileName={profileName}
phoneNumber={phoneNumber}
title={title}
conversationType={conversationType}
state={mrState}
@ -71,11 +65,9 @@ export const MandatoryProfileSharingActions = ({
className="module-message-request-actions__message__name"
>
<ContactName
name={name}
profileName={profileName}
phoneNumber={phoneNumber}
title={firstName || title}
i18n={i18n}
firstName={firstName}
title={title}
preferFirstName
/>
</strong>
),