Remove unnecessary props from <ContactName>
This commit is contained in:
parent
43685d15c6
commit
eed7aff925
42 changed files with 57 additions and 423 deletions
|
@ -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>
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue