mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-17 00:21:20 -05:00
Switch ordering
so `intl` comes first
This commit is contained in:
parent
0d9493de12
commit
61ef3c2c69
1 changed files with 8 additions and 6 deletions
|
@ -27,12 +27,14 @@ var Tooltip = require('../../components/tooltip/tooltip.jsx');
|
|||
require('./steps.scss');
|
||||
|
||||
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({
|
||||
label: intl.formatMessage({id: 'registration.selectCountry'}),
|
||||
disabled: true,
|
||||
|
@ -352,7 +354,7 @@ module.exports = {
|
|||
</div>
|
||||
<Select label={formatMessage({id: 'general.country'})}
|
||||
name="user.country"
|
||||
options={getCountryOptions(DEFAULT_COUNTRY, this.props.intl)}
|
||||
options={getCountryOptions(this.props.intl, DEFAULT_COUNTRY)}
|
||||
required />
|
||||
<Checkbox className="demographics-checkbox-is-robot"
|
||||
label="I'm a robot!"
|
||||
|
|
Loading…
Reference in a new issue