Revert "on complete join flow, take user to new project"

This commit is contained in:
Benjamin Wheeler 2019-08-26 15:40:41 -04:00 committed by GitHub
parent 008f600d99
commit 607a314189
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 10 deletions

View file

@ -217,7 +217,6 @@ class Navigation extends React.Component {
{this.props.registrationOpen && (
this.props.useScratch3Registration ? (
<Scratch3Registration
createProjectOnComplete
isOpen
key="scratch3registration"
/>

View file

@ -23,22 +23,17 @@ const Registration = ({
);
Registration.propTypes = {
createProjectOnComplete: PropTypes.bool,
handleCloseRegistration: PropTypes.func,
handleCompleteRegistration: PropTypes.func,
isOpen: PropTypes.bool
};
Registration.defaultProps = {
createProjectOnComplete: false
};
const mapDispatchToProps = (dispatch, ownProps) => ({
const mapDispatchToProps = dispatch => ({
handleCloseRegistration: () => {
dispatch(navigationActions.setRegistrationOpen(false));
},
handleCompleteRegistration: () => {
dispatch(navigationActions.handleCompleteRegistration(ownProps.createProjectOnComplete));
dispatch(navigationActions.handleCompleteRegistration());
}
});

View file

@ -92,10 +92,9 @@ module.exports.setSearchTerm = searchTerm => ({
searchTerm: searchTerm
});
module.exports.handleCompleteRegistration = createProject => (dispatch => {
module.exports.handleCompleteRegistration = () => (dispatch => {
dispatch(sessionActions.refreshSession());
dispatch(module.exports.setRegistrationOpen(false));
if (createProject) window.location = '/projects/editor/?tutorial=getStarted';
});
module.exports.handleLogIn = (formData, callback) => (dispatch => {