%PDF- %PDF-
Direktori : /home/emergentqj/actioncivile/pre-auth/.4cc3a2e1590a4463a5f392ddcc26929e/static/js/containers/ |
Current File : /home/emergentqj/actioncivile/pre-auth/.4cc3a2e1590a4463a5f392ddcc26929e/static/js/containers/SignUpContainer.js |
import { connect } from "react-redux"; import appConfig from "config/countryData"; import SignUpWrapper from "components/SignUp"; import { selectCode, } from "../actions/list_actions"; const mapStateToProps = (state) => { const countrycode = state.config.toJS().config.countryConstant; const { countryData, businessRegistrationEnabled } = appConfig; const signUpForm = state.form.signUpForm ? state.form.signUpForm : null; /* eslint-disable-next-line max-len */ const showSignUpBusinessForm = countrycode ? businessRegistrationEnabled.indexOf(countrycode.toLowerCase()) > -1 : false; const showEpHighlight = countrycode ? !!countryData[countrycode].showSignupEPHighlights : false; const selectedCode = state.user.get("selectedCode"); return { user: state.user, signInForm: signUpForm, countryCode: countrycode, countryConstant: state.config.toJS().config.countryConstant, selectedCode, showSignUpBusinessForm, errorType: state.user.get("errorType"), showEpHighlight, countryCodes: state.lang, signUpModal: state.user.get("signUpModal"), }; }; const mapDispatchToProps = (dispatch) => ({ selectCode: (code) => dispatch(selectCode(code)), }); export default connect( mapStateToProps, mapDispatchToProps, )(SignUpWrapper);