From 691faabe2814a5bb0993e066231a4041ed36f0d5 Mon Sep 17 00:00:00 2001 From: Ben Wheeler Date: Mon, 23 Sep 2019 11:25:10 -0400 Subject: [PATCH] pass createProjectOnComplete prop through join flow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …so welcome step can display correct completion text --- src/components/join-flow/join-flow.jsx | 2 ++ src/components/join-flow/welcome-step.jsx | 7 +++++-- src/components/modal/join/modal.jsx | 5 ++++- src/components/registration/scratch3-registration.jsx | 5 +++-- src/l10n.json | 1 + 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/components/join-flow/join-flow.jsx b/src/components/join-flow/join-flow.jsx index 6849531e6..2d40452e2 100644 --- a/src/components/join-flow/join-flow.jsx +++ b/src/components/join-flow/join-flow.jsx @@ -155,6 +155,7 @@ class JoinFlow extends React.Component { onRegistrationError={this.handleRegistrationError} /> - } + ) : ( + + )} title={`${this.props.intl.formatMessage( {id: 'registration.welcomeStepTitleNonEducator'}, {username: this.props.username} @@ -79,6 +81,7 @@ class WelcomeStep extends React.Component { } WelcomeStep.propTypes = { + createProjectOnComplete: PropTypes.bool, email: PropTypes.string, intl: intlShape, onNextStep: PropTypes.func, diff --git a/src/components/modal/join/modal.jsx b/src/components/modal/join/modal.jsx index bd17ac6ab..7edc22a3c 100644 --- a/src/components/modal/join/modal.jsx +++ b/src/components/modal/join/modal.jsx @@ -6,7 +6,8 @@ const JoinFlow = require('../../join-flow/join-flow.jsx'); require('./modal.scss'); const JoinModal = ({ - onCompleteRegistration, // eslint-disable-line no-unused-vars + createProjectOnComplete, + onCompleteRegistration, onRequestClose, ...modalProps }) => ( @@ -20,12 +21,14 @@ const JoinModal = ({ {...modalProps} > ); JoinModal.propTypes = { + createProjectOnComplete: PropTypes.bool, onCompleteRegistration: PropTypes.func, onRequestClose: PropTypes.func, showCloseButton: PropTypes.bool diff --git a/src/components/registration/scratch3-registration.jsx b/src/components/registration/scratch3-registration.jsx index 220c01433..0dbf68289 100644 --- a/src/components/registration/scratch3-registration.jsx +++ b/src/components/registration/scratch3-registration.jsx @@ -8,12 +8,14 @@ const JoinModal = require('../modal/join/modal.jsx'); require('./registration.scss'); const Registration = ({ + createProjectOnComplete, handleCloseRegistration, handleCompleteRegistration, isOpen }) => (