Commit 61ef3c2c authored by Matthew Taylor's avatar Matthew Taylor

Switch ordering

so `intl` comes first
parent 0d9493de
...@@ -27,12 +27,14 @@ var Tooltip = require('../../components/tooltip/tooltip.jsx'); ...@@ -27,12 +27,14 @@ var Tooltip = require('../../components/tooltip/tooltip.jsx');
require('./steps.scss'); require('./steps.scss');
var DEFAULT_COUNTRY = 'us'; var DEFAULT_COUNTRY = 'us';
var getCountryOptions = function (defaultCountry, intl) {
if (typeof intl === 'undefined') {
intl = defaultCountry;
defaultCountry = undefined;
}
/**
* Return a list of options to give to frc select
* @param {Object} intl 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
*/
var getCountryOptions = function (intl, defaultCountry) {
var options = countryData.countryOptions.concat({ var options = countryData.countryOptions.concat({
label: intl.formatMessage({id: 'registration.selectCountry'}), label: intl.formatMessage({id: 'registration.selectCountry'}),
disabled: true, disabled: true,
...@@ -352,7 +354,7 @@ module.exports = { ...@@ -352,7 +354,7 @@ module.exports = {
</div> </div>
<Select label={formatMessage({id: 'general.country'})} <Select label={formatMessage({id: 'general.country'})}
name="user.country" name="user.country"
options={getCountryOptions(DEFAULT_COUNTRY, this.props.intl)} options={getCountryOptions(this.props.intl, DEFAULT_COUNTRY)}
required /> required />
<Checkbox className="demographics-checkbox-is-robot" <Checkbox className="demographics-checkbox-is-robot"
label="I'm a robot!" label="I'm a robot!"
......
Markdown is supported
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