Skip to content
Snippets Groups Projects
Commit c281f4bb authored by Anca Ursachi's avatar Anca Ursachi
Browse files

fix(country-list): display country dropdown on signUp

parent 637a6cdd
No related branches found
No related tags found
2 merge requests!110Sprint 21 Features,!80fix(country-list): display country dropdown on signUp
...@@ -9,8 +9,6 @@ const countryMapper = c => { ...@@ -9,8 +9,6 @@ const countryMapper = c => {
return 'SRB' return 'SRB'
case 'ME': case 'ME':
return 'MNT' return 'MNT'
case 'CG':
return 'CD'
default: default:
return c return c
} }
...@@ -24,8 +22,6 @@ const codeMapper = c => { ...@@ -24,8 +22,6 @@ const codeMapper = c => {
return 'RS' return 'RS'
case 'MNT': case 'MNT':
return 'ME' return 'ME'
case 'CD':
return 'CG'
default: default:
return c return c
} }
......
...@@ -12,6 +12,7 @@ import { ...@@ -12,6 +12,7 @@ import {
Label, Label,
ActionLink, ActionLink,
ItemOverrideAlert, ItemOverrideAlert,
withCountries,
} from 'pubsweet-component-faraday-ui' } from 'pubsweet-component-faraday-ui'
const AgreeCheckbox = ({ value, onChange }) => ( const AgreeCheckbox = ({ value, onChange }) => (
...@@ -73,7 +74,13 @@ const Step0 = ({ ...@@ -73,7 +74,13 @@ const Step0 = ({
<ItemOverrideAlert ml={1} vertical> <ItemOverrideAlert ml={1} vertical>
<Label required>Country</Label> <Label required>Country</Label>
<ValidatedField <ValidatedField
component={TextField} component={input => (
<Menu
{...input}
options={countries}
placeholder="Please select"
/>
)}
name="country" name="country"
validate={[requiredValidator]} validate={[requiredValidator]}
/> />
...@@ -128,9 +135,11 @@ const Step0 = ({ ...@@ -128,9 +135,11 @@ const Step0 = ({
) )
export default compose( export default compose(
withCountries,
reduxForm({ reduxForm({
form: 'signUpInvitation', form: 'signUpInvitation',
destroyOnUnmount: false, destroyOnUnmount: false,
forceUnregisterOnUnmount: true, forceUnregisterOnUnmount: true,
enableReinitialize: true,
}), }),
)(Step0) )(Step0)
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment