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 ) {
@@ -41,7 +40,7 @@ export default class CountryDropdown extends React.Component {
41
40
42
41
this . state = {
43
42
searchQuery : '' ,
44
- }
43
+ } ;
45
44
}
46
45
47
46
componentWillMount ( ) {
@@ -64,13 +63,7 @@ export default class CountryDropdown extends React.Component {
64
63
}
65
64
66
65
_flagImgForIso2 ( iso2 ) {
67
- // Unicode Regional Indicator Symbol letter 'A'
68
- const RIS_A = 0x1F1E6 ;
69
- const ASCII_A = 65 ;
70
- return charactersToImageNode ( iso2 , true ,
71
- RIS_A + ( iso2 . charCodeAt ( 0 ) - ASCII_A ) ,
72
- RIS_A + ( iso2 . charCodeAt ( 1 ) - ASCII_A ) ,
73
- ) ;
66
+ return < img src = { `flags/${ iso2 } .png` } /> ;
74
67
}
75
68
76
69
render ( ) {
@@ -115,7 +108,7 @@ export default class CountryDropdown extends React.Component {
115
108
value = { value } searchEnabled = { true }
116
109
>
117
110
{ options }
118
- </ Dropdown >
111
+ </ Dropdown > ;
119
112
}
120
113
}
121
114
You can’t perform that action at this time.
0 commit comments