mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-09-08 11:39:49 +00:00
Small fixes to country code select
This commit is contained in:
parent
705a74e2ae
commit
99bdaa608e
1 changed files with 4 additions and 4 deletions
|
@ -9,10 +9,10 @@ const countryCodes = require('country-data')
|
||||||
[]
|
[]
|
||||||
)
|
)
|
||||||
.sort((a, b) => {
|
.sort((a, b) => {
|
||||||
if (a.countryCallingCodes[0] < b.countryCallingCodes[0]) {
|
if (a.countryCallingCode < b.countryCallingCode) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (a.countryCallingCodes[0] > b.countryCallingCodes[0]) {
|
if (a.countryCallingCode > b.countryCallingCode) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -94,8 +94,8 @@ class UserFieldNew extends React.PureComponent {
|
||||||
<Form onSubmit={this.handleSubmit.bind(this)}>
|
<Form onSubmit={this.handleSubmit.bind(this)}>
|
||||||
<div className="form-row-phone">
|
<div className="form-row-phone">
|
||||||
<FormField type="select" onChange={this.handleSelect.bind(this)}>
|
<FormField type="select" onChange={this.handleSelect.bind(this)}>
|
||||||
{countryCodes.map(country => (
|
{countryCodes.map((country, index) => (
|
||||||
<option value={country.countryCallingCode}>
|
<option key={index} value={country.countryCallingCode}>
|
||||||
{country.emoji} {country.countryCallingCode}
|
{country.emoji} {country.countryCallingCode}
|
||||||
</option>
|
</option>
|
||||||
))}
|
))}
|
||||||
|
|
Loading…
Add table
Reference in a new issue