Migrate conversations to ESLint
This commit is contained in:
parent
b4f0f3c685
commit
372aa44e49
90 changed files with 1261 additions and 1165 deletions
|
@ -29,61 +29,62 @@ type PropsHousekeeping = {
|
|||
|
||||
export type Props = PropsData & PropsHousekeeping & PropsActions;
|
||||
|
||||
export class UnsupportedMessage extends React.Component<Props> {
|
||||
public render() {
|
||||
const { canProcessNow, contact, i18n, downloadNewVersion } = this.props;
|
||||
const { isMe } = contact;
|
||||
export const UnsupportedMessage = ({
|
||||
canProcessNow,
|
||||
contact,
|
||||
i18n,
|
||||
downloadNewVersion,
|
||||
}: Props): JSX.Element => {
|
||||
const { isMe } = contact;
|
||||
|
||||
const otherStringId = canProcessNow
|
||||
? 'Message--unsupported-message-ask-to-resend'
|
||||
: 'Message--unsupported-message';
|
||||
const meStringId = canProcessNow
|
||||
? 'Message--from-me-unsupported-message-ask-to-resend'
|
||||
: 'Message--from-me-unsupported-message';
|
||||
const stringId = isMe ? meStringId : otherStringId;
|
||||
const otherStringId = canProcessNow
|
||||
? 'Message--unsupported-message-ask-to-resend'
|
||||
: 'Message--unsupported-message';
|
||||
const meStringId = canProcessNow
|
||||
? 'Message--from-me-unsupported-message-ask-to-resend'
|
||||
: 'Message--from-me-unsupported-message';
|
||||
const stringId = isMe ? meStringId : otherStringId;
|
||||
|
||||
return (
|
||||
<div className="module-unsupported-message">
|
||||
<div
|
||||
className={classNames(
|
||||
'module-unsupported-message__icon',
|
||||
canProcessNow
|
||||
? 'module-unsupported-message__icon--can-process'
|
||||
: null
|
||||
)}
|
||||
/>
|
||||
<div className="module-unsupported-message__text">
|
||||
<Intl
|
||||
id={stringId}
|
||||
components={[
|
||||
<span
|
||||
key="external-1"
|
||||
className="module-unsupported-message__contact"
|
||||
>
|
||||
<ContactName
|
||||
name={contact.name}
|
||||
profileName={contact.profileName}
|
||||
phoneNumber={contact.phoneNumber}
|
||||
title={contact.title}
|
||||
module="module-unsupported-message__contact"
|
||||
i18n={i18n}
|
||||
/>
|
||||
</span>,
|
||||
]}
|
||||
i18n={i18n}
|
||||
/>
|
||||
</div>
|
||||
{canProcessNow ? null : (
|
||||
<button
|
||||
onClick={() => {
|
||||
downloadNewVersion();
|
||||
}}
|
||||
className="module-unsupported-message__button"
|
||||
>
|
||||
{i18n('Message--update-signal')}
|
||||
</button>
|
||||
return (
|
||||
<div className="module-unsupported-message">
|
||||
<div
|
||||
className={classNames(
|
||||
'module-unsupported-message__icon',
|
||||
canProcessNow ? 'module-unsupported-message__icon--can-process' : null
|
||||
)}
|
||||
/>
|
||||
<div className="module-unsupported-message__text">
|
||||
<Intl
|
||||
id={stringId}
|
||||
components={[
|
||||
<span
|
||||
key="external-1"
|
||||
className="module-unsupported-message__contact"
|
||||
>
|
||||
<ContactName
|
||||
name={contact.name}
|
||||
profileName={contact.profileName}
|
||||
phoneNumber={contact.phoneNumber}
|
||||
title={contact.title}
|
||||
module="module-unsupported-message__contact"
|
||||
i18n={i18n}
|
||||
/>
|
||||
</span>,
|
||||
]}
|
||||
i18n={i18n}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
{canProcessNow ? null : (
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => {
|
||||
downloadNewVersion();
|
||||
}}
|
||||
className="module-unsupported-message__button"
|
||||
>
|
||||
{i18n('Message--update-signal')}
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue