Update src/Registration.js

Co-Authored-By: Will Hunt <will@half-shot.uk>
pull/21833/head
Stuart Mumford 2020-02-05 15:36:00 +00:00
parent 5edb0ec912
commit de05965fc0
No known key found for this signature in database
GPG Key ID: 60BC5C03E6276769
1 changed files with 4 additions and 3 deletions

View File

@ -40,7 +40,7 @@ export const SAFE_LOCALPART_REGEX = /^[a-z0-9=_\-./]+$/;
* @param {bool} options.go_welcome_on_cancel
* If true, goes to the welcome page if the user cancels the action
* @param {bool} options.screen_after
* If present the screen to redict to after a successful login or register.
* If present the screen to redirect to after a successful login or register.
*/
export async function startAnyRegistrationFlow(options) {
if (options === undefined) options = {};
@ -75,8 +75,9 @@ export async function startAnyRegistrationFlow(options) {
extraButtons: [
<button className="mx_Dialog_primary" key="start_login"
onClick={() => {
modal.close(); dis.dispatch({action: 'start_login',
screenAfterLogin: options.screen_after});
modal.close();
dis.dispatch({action: 'start_login',
screenAfterLogin: options.screen_after});
}
}>
{ _t('Login') }