diff --git a/src/components/navigation/www/navigation.jsx b/src/components/navigation/www/navigation.jsx index 7bc3ca663..90d34bcad 100644 --- a/src/components/navigation/www/navigation.jsx +++ b/src/components/navigation/www/navigation.jsx @@ -217,6 +217,7 @@ class Navigation extends React.Component { {this.props.registrationOpen && ( this.props.useScratch3Registration ? ( diff --git a/src/components/registration/scratch3-registration.jsx b/src/components/registration/scratch3-registration.jsx index 03f53d763..c345c168e 100644 --- a/src/components/registration/scratch3-registration.jsx +++ b/src/components/registration/scratch3-registration.jsx @@ -23,17 +23,22 @@ const Registration = ({ ); Registration.propTypes = { + createProjectOnComplete: PropTypes.bool, handleCloseRegistration: PropTypes.func, handleCompleteRegistration: PropTypes.func, isOpen: PropTypes.bool }; -const mapDispatchToProps = dispatch => ({ +Registration.defaultProps = { + createProjectOnComplete: false +}; + +const mapDispatchToProps = (dispatch, ownProps) => ({ handleCloseRegistration: () => { dispatch(navigationActions.setRegistrationOpen(false)); }, handleCompleteRegistration: () => { - dispatch(navigationActions.handleCompleteRegistration()); + dispatch(navigationActions.handleCompleteRegistration(ownProps.createProjectOnComplete)); } }); diff --git a/src/redux/navigation.js b/src/redux/navigation.js index 0e71090ae..957f9d4e7 100644 --- a/src/redux/navigation.js +++ b/src/redux/navigation.js @@ -92,9 +92,10 @@ module.exports.setSearchTerm = searchTerm => ({ searchTerm: searchTerm }); -module.exports.handleCompleteRegistration = () => (dispatch => { +module.exports.handleCompleteRegistration = createProject => (dispatch => { dispatch(sessionActions.refreshSession()); dispatch(module.exports.setRegistrationOpen(false)); + if (createProject) window.location = '/projects/editor/?tutorial=getStarted'; }); module.exports.handleLogIn = (formData, callback) => (dispatch => {