Conform to new react and typescript eslint rules

This commit is contained in:
Michael Telatynski 2021-07-19 22:43:11 +01:00
parent b6feaf74bc
commit ce78cdf4ad
266 changed files with 1992 additions and 2000 deletions

View file

@ -28,9 +28,9 @@ export default class VerificationCancelled extends React.Component<IProps> {
public render(): React.ReactNode {
const DialogButtons = sdk.getComponent('views.elements.DialogButtons');
return <div>
<p>{_t(
<p>{ _t(
"The other party cancelled the verification.",
)}</p>
) }</p>
<DialogButtons
primaryButton={_t('OK')}
hasCancel={false}

View file

@ -28,12 +28,12 @@ export default class VerificationComplete extends React.Component<IProps> {
public render(): React.ReactNode {
const DialogButtons = sdk.getComponent('views.elements.DialogButtons');
return <div>
<h2>{_t("Verified!")}</h2>
<p>{_t("You've successfully verified this user.")}</p>
<p>{_t(
<h2>{ _t("Verified!") }</h2>
<p>{ _t("You've successfully verified this user.") }</p>
<p>{ _t(
"Secure messages with this user are end-to-end encrypted and not able to be " +
"read by third parties.",
)}</p>
) }</p>
<DialogButtons onPrimaryButtonClick={this.props.onDone}
primaryButton={_t("Got It")}
hasCancel={false}

View file

@ -81,14 +81,14 @@ export default class VerificationShowSas extends React.Component<IProps, IState>
{ emoji[0] }
</div>
<div className="mx_VerificationShowSas_emojiSas_label">
{_t(capFirst(emoji[1]))}
{ _t(capFirst(emoji[1])) }
</div>
</div>,
);
sasDisplay = <div className="mx_VerificationShowSas_emojiSas">
{emojiBlocks.slice(0, 4)}
{ emojiBlocks.slice(0, 4) }
<div className="mx_VerificationShowSas_emojiSas_break" />
{emojiBlocks.slice(4)}
{ emojiBlocks.slice(4) }
</div>;
sasCaption = this.props.isSelf ?
_t(
@ -99,10 +99,10 @@ export default class VerificationShowSas extends React.Component<IProps, IState>
);
} else if (this.props.sas.decimal) {
const numberBlocks = this.props.sas.decimal.map((num, i) => <span key={i}>
{num}
{ num }
</span>);
sasDisplay = <div className="mx_VerificationShowSas_decimalSas">
{numberBlocks}
{ numberBlocks }
</div>;
sasCaption = this.props.isSelf ?
_t(
@ -113,9 +113,9 @@ export default class VerificationShowSas extends React.Component<IProps, IState>
);
} else {
return <div>
{_t("Unable to find a supported verification method.")}
{ _t("Unable to find a supported verification method.") }
<AccessibleButton kind="primary" onClick={this.props.onCancel} className="mx_UserInfo_wideButton">
{_t('Cancel')}
{ _t('Cancel') }
</AccessibleButton>
</div>;
}
@ -165,12 +165,12 @@ export default class VerificationShowSas extends React.Component<IProps, IState>
}
return <div className="mx_VerificationShowSas">
<p>{sasCaption}</p>
{sasDisplay}
<p>{this.props.isSelf ?
<p>{ sasCaption }</p>
{ sasDisplay }
<p>{ this.props.isSelf ?
"":
_t("To be secure, do this in person or use a trusted way to communicate.")}</p>
{confirm}
_t("To be secure, do this in person or use a trusted way to communicate.") }</p>
{ confirm }
</div>;
}
}