This repository was archived by the owner on Sep 11, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed
src/components/views/login Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ import React from 'react';
19
19
import sdk from '../../../index' ;
20
20
21
21
import { COUNTRIES } from '../../../phonenumber' ;
22
- import { charactersToImageNode } from '../../../HtmlUtils' ;
23
22
24
23
const COUNTRIES_BY_ISO2 = new Object ( null ) ;
25
24
for ( const c of COUNTRIES ) {
@@ -42,7 +41,7 @@ export default class CountryDropdown extends React.Component {
42
41
43
42
this . state = {
44
43
searchQuery : '' ,
45
- }
44
+ } ;
46
45
}
47
46
48
47
componentWillMount ( ) {
@@ -65,13 +64,7 @@ export default class CountryDropdown extends React.Component {
65
64
}
66
65
67
66
_flagImgForIso2 ( iso2 ) {
68
- // Unicode Regional Indicator Symbol letter 'A'
69
- const RIS_A = 0x1F1E6 ;
70
- const ASCII_A = 65 ;
71
- return charactersToImageNode ( iso2 , true ,
72
- RIS_A + ( iso2 . charCodeAt ( 0 ) - ASCII_A ) ,
73
- RIS_A + ( iso2 . charCodeAt ( 1 ) - ASCII_A ) ,
74
- ) ;
67
+ return < img src = { `flags/${ iso2 } .png` } /> ;
75
68
}
76
69
77
70
_getShortOption ( iso2 ) {
@@ -128,7 +121,7 @@ export default class CountryDropdown extends React.Component {
128
121
value = { value } searchEnabled = { true }
129
122
>
130
123
{ options }
131
- </ Dropdown >
124
+ </ Dropdown > ;
132
125
}
133
126
}
134
127
You can’t perform that action at this time.
0 commit comments