1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-07 10:46:24 +03:00

Apply suggestions from code review

Co-Authored-By: Travis Ralston <travpc@gmail.com>
This commit is contained in:
Stuart Mumford
2020-02-28 10:47:23 +00:00
committed by GitHub
parent c96dd9715a
commit aec622d5d0
3 changed files with 10 additions and 19 deletions

View File

@@ -75,20 +75,14 @@ export async function startAnyRegistrationFlow(options) {
description: _t("Use your account or create a new one to continue."),
button: _t("Create Account"),
extraButtons: [
<button key="start_login"
onClick={() => {
<button key="start_login" onClick={() => {
modal.close();
dis.dispatch({action: 'start_login',
screenAfterLogin: options.screen_after});
}
}>
{ _t('Sign In') }
</button>,
dis.dispatch({action: 'start_login', screenAfterLogin: options.screen_after});
}}>{ _t('Sign In') }</button>,
],
onFinished: (proceed) => {
if (proceed) {
dis.dispatch({action: 'start_registration',
screenAfterLogin: options.screen_after});
dis.dispatch({action: 'start_registration', screenAfterLogin: options.screen_after});
} else if (options.go_home_on_cancel) {
dis.dispatch({action: 'view_home_page'});
} else if (options.go_welcome_on_cancel) {