close modal

pull/21833/head
Stuart Mumford 2020-01-08 10:34:47 +00:00
parent aad17a0be5
commit 2c6045fe9f
No known key found for this signature in database
GPG Key ID: 60BC5C03E6276769
1 changed files with 2 additions and 2 deletions

View File

@ -66,13 +66,13 @@ export async function startAnyRegistrationFlow(options) {
// });
//} else {
const QuestionDialog = sdk.getComponent("dialogs.QuestionDialog");
Modal.createTrackedDialog('Registration required', '', QuestionDialog, {
const modal = Modal.createTrackedDialog('Registration required', '', QuestionDialog, {
title: _t("Login or Registration Required"),
description: _t("You need to login or register to do this."),
button: _t("Register"),
extraButtons: [
<button className="mx_Dialog_primary"
onClick={() => {dis.dispatch({action: 'start_login'});}}>
onClick={() => {modal.close(); dis.dispatch({action: 'start_login'});}}>
{ _t('Login') }
</button>,
],