File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,6 +43,18 @@ export default function ResidenceStep(props) {
4343 } )
4444 . then ( place => {
4545 let casePlace = new CasePlace ( place . placeID ) ;
46+ try {
47+ for ( let component of place . addressComponents ) {
48+ for ( let type of component . types ) {
49+ if ( type === "country" ) {
50+ casePlace . region = component . shortName
51+ }
52+ }
53+ }
54+ } catch ( err ) {
55+ // send error to log file
56+ }
57+
4658 casePlace . latitude = place . location . latitude ;
4759 casePlace . longitude = place . location . longitude ;
4860 casePlace . place_name = place . address ;
@@ -87,15 +99,14 @@ export default function ResidenceStep(props) {
8799 />
88100 </ Card >
89101 ) : (
90- false
91- ) }
92- < Button
102+ < Button
93103 mode = "outlined"
94104 style = { styles . actionButton }
95105 labelStyle = { styles . actionButtonLabel }
96106 onPress = { ( ) => openPlacesSearchModal ( ) } >
97107 { t ( 'report.residence.pickPlace' ) }
98108 </ Button >
109+ ) }
99110 </ StepContainer >
100111 ) ;
101112}
You can’t perform that action at this time.
0 commit comments