remove redundant use of redux registrationOpen

This commit is contained in:
Ben Wheeler 2019-08-26 14:09:05 -04:00
parent add30d9d26
commit 37c2112a3e
5 changed files with 7 additions and 10 deletions

View file

@ -6,15 +6,14 @@ const JoinFlow = require('../../join-flow/join-flow.jsx');
require('./modal.scss');
const JoinModal = ({
isOpen,
onCompleteRegistration, // eslint-disable-line no-unused-vars
onRequestClose,
...modalProps
}) => (
<Modal
isOpen
useStandardSizes
className="mod-join"
isOpen={isOpen}
onRequestClose={onRequestClose}
{...modalProps}
>
@ -25,7 +24,6 @@ const JoinModal = ({
);
JoinModal.propTypes = {
isOpen: PropTypes.bool,
onCompleteRegistration: PropTypes.func,
onRequestClose: PropTypes.func
};

View file

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

View file

@ -28,10 +28,6 @@ Registration.propTypes = {
isOpen: PropTypes.bool
};
const mapStateToProps = state => ({
isOpen: state.navigation.registrationOpen
});
const mapDispatchToProps = dispatch => ({
handleCloseRegistration: () => {
dispatch(navigationActions.setRegistrationOpen(false));
@ -42,6 +38,6 @@ const mapDispatchToProps = dispatch => ({
});
module.exports = connect(
mapStateToProps,
() => ({}),
mapDispatchToProps
)(Registration);

View file

@ -18,7 +18,7 @@ const Types = keyMirror({
});
module.exports.getInitialState = () => ({
useScratch3Registration: true,
useScratch3Registration: false,
accountNavOpen: false,
canceledDeletionOpen: false,
loginError: null,

View file

@ -754,7 +754,9 @@ class Preview extends React.Component {
/>
{this.props.registrationOpen && (
this.props.useScratch3Registration ? (
<Scratch3Registration />
<Scratch3Registration
isOpen
/>
) : (
<Registration />
)