Removed emojis on Windows and Linux
This commit is contained in:
parent
bdc49691f0
commit
23261d0759
1 changed files with 3 additions and 1 deletions
|
@ -2,6 +2,7 @@ import React from 'react';
|
||||||
import { Form, FormRow, Submit } from 'component/form.js';
|
import { Form, FormRow, Submit } from 'component/form.js';
|
||||||
import FormField from 'component/formField';
|
import FormField from 'component/formField';
|
||||||
|
|
||||||
|
const os = require('os').type();
|
||||||
const countryCodes = require('country-data')
|
const countryCodes = require('country-data')
|
||||||
.callingCountries.all.filter(_ => _.emoji)
|
.callingCountries.all.filter(_ => _.emoji)
|
||||||
.reduce(
|
.reduce(
|
||||||
|
@ -79,7 +80,8 @@ class UserPhoneNew extends React.PureComponent {
|
||||||
<FormField type="select" onChange={this.handleSelect.bind(this)}>
|
<FormField type="select" onChange={this.handleSelect.bind(this)}>
|
||||||
{countryCodes.map((country, index) => (
|
{countryCodes.map((country, index) => (
|
||||||
<option key={index} value={country.countryCallingCode}>
|
<option key={index} value={country.countryCallingCode}>
|
||||||
{country.emoji} {country.countryCallingCode}
|
{os === 'Darwin' ? country.emoji : `(${country.alpha2})`}{' '}
|
||||||
|
{country.countryCallingCode}
|
||||||
</option>
|
</option>
|
||||||
))}
|
))}
|
||||||
</FormField>
|
</FormField>
|
||||||
|
|
Loading…
Reference in a new issue