diff --git a/src/components/registration/steps.jsx b/src/components/registration/steps.jsx index f9c0b3b4c..c3c2aa993 100644 --- a/src/components/registration/steps.jsx +++ b/src/components/registration/steps.jsx @@ -33,29 +33,20 @@ require('./steps.scss'); const DEFAULT_COUNTRY = 'us'; /** - * Return a list of options to give to frc select + * Return a list of options to give to select * @param {object} reactIntl react-intl, used to localize strings - * @param {string} defaultCountry optional string of default country to put at top of list - * @return {object} ordered set of county options formatted for frc select + * @return {object} ordered set of county options formatted for select */ -const getCountryOptions = (reactIntl, defaultCountry) => { - const options = countryData.countryOptions.concat({ - label: reactIntl.formatMessage({id: 'registration.selectCountry'}), - disabled: true, - value: '' - }); - - if (typeof defaultCountry !== 'undefined') { - return options.sort((a, b) => { - if (a.disabled) return -1; - if (b.disabled) return 1; - if (a.value === defaultCountry) return -1; - if (b.value === defaultCountry) return 1; - return 0; - }); - } - return options; -}; +const getCountryOptions = reactIntl => ( + [ + { + label: reactIntl.formatMessage({id: 'registration.selectCountry'}), + disabled: true, + value: '' + }, + ...countryData.registrationCountryOptions + ] +); const NextStepButton = props => (