mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-26 17:16:11 -05:00
remove redundant use of redux registrationOpen
This commit is contained in:
parent
add30d9d26
commit
37c2112a3e
5 changed files with 7 additions and 10 deletions
|
@ -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
|
||||
};
|
||||
|
|
|
@ -217,6 +217,7 @@ class Navigation extends React.Component {
|
|||
{this.props.registrationOpen && (
|
||||
this.props.useScratch3Registration ? (
|
||||
<Scratch3Registration
|
||||
isOpen
|
||||
key="scratch3registration"
|
||||
/>
|
||||
) : (
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -18,7 +18,7 @@ const Types = keyMirror({
|
|||
});
|
||||
|
||||
module.exports.getInitialState = () => ({
|
||||
useScratch3Registration: true,
|
||||
useScratch3Registration: false,
|
||||
accountNavOpen: false,
|
||||
canceledDeletionOpen: false,
|
||||
loginError: null,
|
||||
|
|
|
@ -754,7 +754,9 @@ class Preview extends React.Component {
|
|||
/>
|
||||
{this.props.registrationOpen && (
|
||||
this.props.useScratch3Registration ? (
|
||||
<Scratch3Registration />
|
||||
<Scratch3Registration
|
||||
isOpen
|
||||
/>
|
||||
) : (
|
||||
<Registration />
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue