File tree Expand file tree Collapse file tree 1 file changed +17
-7
lines changed
Expand file tree Collapse file tree 1 file changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -147,16 +147,25 @@ export default function PhoneNumberStep(props) {
147147
148148 const getCountryCode = ( ) => {
149149 var countryCode = null ;
150+
150151 try {
151- countryCode = RNLocalize . getCountry ( ) ;
152+ countryCode = props . caseReport . residence . region ;
152153 } catch {
153- countryCode = DEFAULT_COUNTRY_CODE ;
154+ // do nothiing
154155 }
155156
156- if ( countryCode == null ) {
157- countryCode = DEFAULT_COUNTRY_CODE ;
158- }
157+ if ( ! countryCode ) {
158+ try {
159+ countryCode = RNLocalize . getCountry ( ) ;
160+ } catch {
161+ countryCode = DEFAULT_COUNTRY_CODE ;
162+ }
159163
164+ if ( countryCode == null ) {
165+ countryCode = DEFAULT_COUNTRY_CODE ;
166+ }
167+ }
168+
160169 return countryCode . toLowerCase ( ) ;
161170 } ;
162171
@@ -171,8 +180,9 @@ export default function PhoneNumberStep(props) {
171180 hideNextButton = { props . hideNextButton }
172181 hideBackButton = { props . hideBackButton } >
173182 < View >
174-
175- < Caption style = { { fontSize : 13 , marginTop : - 10 , marginBottom : 10 } } > { t ( "report.phoneNumber.helpText" ) } </ Caption >
183+ < Caption style = { { fontSize : 13 , marginTop : - 10 , marginBottom : 10 } } >
184+ { t ( 'report.phoneNumber.helpText' ) }
185+ </ Caption >
176186 { ! isVerified ? (
177187 < View >
178188 { ! isPhoneNumberEntered ? (
You can’t perform that action at this time.
0 commit comments