fix(authentication) fixed close on cancel click

This commit is contained in:
Calin Chitu 2021-08-23 19:59:17 +03:00 committed by Saúl Ibarra Corretgé
parent 8b23265a50
commit 9d5024cc5d
2 changed files with 4 additions and 16 deletions

View File

@ -124,15 +124,8 @@ class LoginDialog extends Component<Props, State> {
*/
_onCancelLogin() {
const { dispatch } = this.props;
const cancelButton = document.getElementById('modal-dialog-cancel-button');
if (cancelButton) {
cancelButton.onclick = () => {
dispatch(cancelLogin());
};
}
return false;
dispatch(cancelLogin());
}
_onLogin: () => void;
@ -252,6 +245,7 @@ class LoginDialog extends Component<Props, State> {
return (
<Dialog
disableBlanketClickDismiss = { true }
hideCloseIconButton = { true }
okDisabled = {
connecting

View File

@ -64,15 +64,8 @@ class WaitForOwnerDialog extends PureComponent<Props> {
*/
_onCancelWaitForOwner() {
const { dispatch } = this.props;
const cancelButton = document.getElementById('modal-dialog-cancel-button');
if (cancelButton) {
cancelButton.onclick = () => {
dispatch(cancelWaitForOwner());
};
}
return false;
dispatch(cancelWaitForOwner());
}
_onIAmHost: () => void;
@ -102,6 +95,7 @@ class WaitForOwnerDialog extends PureComponent<Props> {
return (
<Dialog
disableBlanketClickDismiss = { true }
hideCloseIconButton = { true }
okKey = { t('dialog.IamHost') }
onCancel = { this._onCancelWaitForOwner }