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

@ -24,19 +24,16 @@ export type Props = {
onDelete(): unknown;
state: MessageRequestState;
onChangeState(state: MessageRequestState): unknown;
} & Omit<ContactNameProps, 'module' | 'i18n'>;
} & Omit<ContactNameProps, 'module'>;
export const MessageRequestActionsConfirmation = ({
conversationType,
i18n,
name,
onBlock,
onBlockAndReportSpam,
onChangeState,
onDelete,
onUnblock,
phoneNumber,
profileName,
state,
title,
}: Props): JSX.Element | null => {
@ -51,16 +48,7 @@ export const MessageRequestActionsConfirmation = ({
<Intl
i18n={i18n}
id={`MessageRequests--block-${conversationType}-confirm-title`}
components={[
<ContactName
key="name"
name={name}
profileName={profileName}
phoneNumber={phoneNumber}
title={title}
i18n={i18n}
/>,
]}
components={[<ContactName key="name" title={title} />]}
/>
}
actions={[
@ -96,16 +84,7 @@ export const MessageRequestActionsConfirmation = ({
<Intl
i18n={i18n}
id="MessageRequests--unblock-confirm-title"
components={[
<ContactName
key="name"
name={name}
profileName={profileName}
phoneNumber={phoneNumber}
title={title}
i18n={i18n}
/>,
]}
components={[<ContactName key="name" title={title} />]}
/>
}
actions={[
@ -132,16 +111,7 @@ export const MessageRequestActionsConfirmation = ({
<Intl
i18n={i18n}
id={`MessageRequests--delete-${conversationType}-confirm-title`}
components={[
<ContactName
key="name"
name={name}
profileName={profileName}
phoneNumber={phoneNumber}
title={title}
i18n={i18n}
/>,
]}
components={[<ContactName key="name" title={title} />]}
/>
}
actions={[