Typing and other PR feedback fixes

This commit is contained in:
Jason Robinson 2020-12-18 16:05:57 +02:00
parent f0e93c6929
commit 0ae28d584b
4 changed files with 50 additions and 27 deletions

View file

@ -16,7 +16,7 @@ limitations under the License.
import * as React from "react";
import EMSElementProDialog from "../views/dialogs/EMSElementProDialog";
import Modal from "../../Modal";
import Modal, {IHandle} from "../../Modal";
import {
IconizedContextMenuOption,
IconizedContextMenuOptionList,
@ -28,8 +28,8 @@ interface IProps {}
interface IState {}
export default class EMSElementProAction extends React.PureComponent<IProps, IState> {
closingAllowed = false;
modalRef: any;
private closingAllowed = false;
private modalRef: IHandle<void[]>;
private openDialog = () => {
this.modalRef = Modal.createTrackedDialog(
@ -52,7 +52,7 @@ export default class EMSElementProAction extends React.PureComponent<IProps, ISt
<IconizedContextMenuOption
iconClassName="mx_UserMenu_iconHosting"
label={_t("Get your own Element!")}
onClick={(e) => this.openDialog()}
onClick={this.openDialog}
/>
</IconizedContextMenuOptionList>
);

View file

@ -319,12 +319,9 @@ export default class UserMenu extends React.Component<IProps, IState> {
"<a>Upgrade</a> to your own domain", {},
{
a: sub => (
<a
href={signupLink}
target="_blank"
rel="noreferrer noopener"
tabIndex={-1}
>{sub}</a>
<a href={signupLink} target="_blank" rel="noreferrer noopener" tabIndex={-1}>
{sub}
</a>
),
},
)}