%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/emergentqj/actioncivile/pre-auth/.632e77b3fb93bc8da5b589b869bc0037/static/js/containers/
Upload File :
Create Path :
Current File : /home/emergentqj/actioncivile/pre-auth/.632e77b3fb93bc8da5b589b869bc0037/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);

Zerion Mini Shell 1.0