diff --git a/packages/component-faraday-ui/src/helpers/withCountries.js b/packages/component-faraday-ui/src/helpers/withCountries.js index ca15d812e023bff42d8fc572ab8cab1ef65fe89b..bd642eddd9bac3cd647a387b93179b957f9513da 100644 --- a/packages/component-faraday-ui/src/helpers/withCountries.js +++ b/packages/component-faraday-ui/src/helpers/withCountries.js @@ -9,8 +9,6 @@ const countryMapper = c => { return 'SRB' case 'ME': return 'MNT' - case 'CG': - return 'CD' default: return c } @@ -24,8 +22,6 @@ const codeMapper = c => { return 'RS' case 'MNT': return 'ME' - case 'CD': - return 'CG' default: return c } diff --git a/packages/components-faraday/src/components/SignUp/SignUpStep0.js b/packages/components-faraday/src/components/SignUp/SignUpStep0.js index 5ade35ecb23a95d81fe9030fc86a4aab92616de2..0c7e9ec11627bbee30c7d934bf6b4e458cd84a19 100644 --- a/packages/components-faraday/src/components/SignUp/SignUpStep0.js +++ b/packages/components-faraday/src/components/SignUp/SignUpStep0.js @@ -12,6 +12,7 @@ import { Label, ActionLink, ItemOverrideAlert, + withCountries, } from 'pubsweet-component-faraday-ui' const AgreeCheckbox = ({ value, onChange }) => ( @@ -73,7 +74,13 @@ const Step0 = ({ <ItemOverrideAlert ml={1} vertical> <Label required>Country</Label> <ValidatedField - component={TextField} + component={input => ( + <Menu + {...input} + options={countries} + placeholder="Please select" + /> + )} name="country" validate={[requiredValidator]} /> @@ -128,9 +135,11 @@ const Step0 = ({ ) export default compose( + withCountries, reduxForm({ form: 'signUpInvitation', destroyOnUnmount: false, forceUnregisterOnUnmount: true, + enableReinitialize: true, }), )(Step0)