From de1db7cc9c78257a4ddd54f4c61f48e73b39f1ea Mon Sep 17 00:00:00 2001 From: Dylan Date: Mon, 25 Sep 2023 17:05:34 +0700 Subject: [PATCH 1/3] add recent destination --- src/components/AddressSearch/index.js | 1 + src/pages/iou/WaypointEditor.js | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/AddressSearch/index.js b/src/components/AddressSearch/index.js index 1b4200572664..8fbdc086f80d 100644 --- a/src/components/AddressSearch/index.js +++ b/src/components/AddressSearch/index.js @@ -291,6 +291,7 @@ function AddressSearch(props) { {props.translate('common.noResultsFound')} ) } + renderHeaderComponent={() => !props.value && props.predefinedPlaces && Recent destinations} onPress={(data, details) => { saveLocationDetails(data, details); diff --git a/src/pages/iou/WaypointEditor.js b/src/pages/iou/WaypointEditor.js index 11459cca3aa8..d2ea1ed12836 100644 --- a/src/pages/iou/WaypointEditor.js +++ b/src/pages/iou/WaypointEditor.js @@ -243,7 +243,6 @@ function WaypointEditor({transactionID, route: {params: {iouType = '', waypointI state: null, }} predefinedPlaces={recentWaypoints} - resultTypes="" /> From bffd57237a62ad7cc1098c0f7e1fe0d6ca2b778b Mon Sep 17 00:00:00 2001 From: Dylan Date: Tue, 26 Sep 2023 12:56:52 +0700 Subject: [PATCH 2/3] update translation --- src/components/AddressSearch/index.js | 7 ++++++- src/languages/en.ts | 1 + src/languages/es.ts | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/AddressSearch/index.js b/src/components/AddressSearch/index.js index 8fbdc086f80d..14d13a63eec3 100644 --- a/src/components/AddressSearch/index.js +++ b/src/components/AddressSearch/index.js @@ -291,7 +291,12 @@ function AddressSearch(props) { {props.translate('common.noResultsFound')} ) } - renderHeaderComponent={() => !props.value && props.predefinedPlaces && Recent destinations} + renderHeaderComponent={() => + !props.value && + props.predefinedPlaces && ( + {props.translate('common.recentDestinations')} + ) + } onPress={(data, details) => { saveLocationDetails(data, details); diff --git a/src/languages/en.ts b/src/languages/en.ts index 6cd21b1e3da8..ea07f9858fc3 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -175,6 +175,7 @@ export default { notifications: 'Notifications', na: 'N/A', noResultsFound: 'No results found', + recentDestinations: 'Recent destinations', timePrefix: "It's", conjunctionFor: 'for', todayAt: 'Today at', diff --git a/src/languages/es.ts b/src/languages/es.ts index f2065ac74089..7b335ab7ff3d 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -165,6 +165,7 @@ export default { notifications: 'Notificaciones', na: 'N/A', noResultsFound: 'No se han encontrado resultados', + recentDestinations: 'Destinos recientes', timePrefix: 'Son las', conjunctionFor: 'para', todayAt: 'Hoy a las', From b12711c01b02fcd5723f3ff4d7f4c15b58ad44fc Mon Sep 17 00:00:00 2001 From: Dylan Date: Thu, 28 Sep 2023 17:31:42 +0700 Subject: [PATCH 3/3] update version react-native-google-places-autocomplete --- package-lock.json | 12 ++++++------ package.json | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8c63ba6ce9b3..048f73f46e08 100644 --- a/package-lock.json +++ b/package-lock.json @@ -81,7 +81,7 @@ "react-native-fast-image": "^8.6.3", "react-native-fs": "^2.20.0", "react-native-gesture-handler": "2.12.0", - "react-native-google-places-autocomplete": "git+https://github.com/Expensify/react-native-google-places-autocomplete.git#cef3ac29d9501091453136e1219e24c4ec9f9d76", + "react-native-google-places-autocomplete": "git+https://github.com/Expensify/react-native-google-places-autocomplete.git#c8c2a873335df19081056a5667f5c109583882e1", "react-native-haptic-feedback": "^1.13.0", "react-native-image-pan-zoom": "^2.1.12", "react-native-image-picker": "^5.1.0", @@ -41099,8 +41099,8 @@ }, "node_modules/react-native-google-places-autocomplete": { "version": "2.5.1", - "resolved": "git+ssh://git@github.com/Expensify/react-native-google-places-autocomplete.git#cef3ac29d9501091453136e1219e24c4ec9f9d76", - "integrity": "sha512-2z3ED8jOXasPTzBqvPwpG10LQsBArTRsYszmoz+TfqbgZrSBmP3c8rhaC//lx6Pvfs2r+KYWqJUrLf4mbCrjZw==", + "resolved": "git+ssh://git@github.com/Expensify/react-native-google-places-autocomplete.git#c8c2a873335df19081056a5667f5c109583882e1", + "integrity": "sha512-jYQJlI5Pp/UI4k4Xy9fqnE0x4BC+O6c5Fh7I+7SjtaywA5KpZqQcYApx2e9YcH/igJ4Rdp/n4awKPX+vE5vFcg==", "license": "MIT", "dependencies": { "lodash.debounce": "^4.0.8", @@ -77213,9 +77213,9 @@ } }, "react-native-google-places-autocomplete": { - "version": "git+ssh://git@github.com/Expensify/react-native-google-places-autocomplete.git#cef3ac29d9501091453136e1219e24c4ec9f9d76", - "integrity": "sha512-2z3ED8jOXasPTzBqvPwpG10LQsBArTRsYszmoz+TfqbgZrSBmP3c8rhaC//lx6Pvfs2r+KYWqJUrLf4mbCrjZw==", - "from": "react-native-google-places-autocomplete@git+https://github.com/Expensify/react-native-google-places-autocomplete.git#cef3ac29d9501091453136e1219e24c4ec9f9d76", + "version": "git+ssh://git@github.com/Expensify/react-native-google-places-autocomplete.git#c8c2a873335df19081056a5667f5c109583882e1", + "integrity": "sha512-jYQJlI5Pp/UI4k4Xy9fqnE0x4BC+O6c5Fh7I+7SjtaywA5KpZqQcYApx2e9YcH/igJ4Rdp/n4awKPX+vE5vFcg==", + "from": "react-native-google-places-autocomplete@git+https://github.com/Expensify/react-native-google-places-autocomplete.git#c8c2a873335df19081056a5667f5c109583882e1", "requires": { "lodash.debounce": "^4.0.8", "prop-types": "^15.7.2", diff --git a/package.json b/package.json index d013caa1c402..a73ed3092673 100644 --- a/package.json +++ b/package.json @@ -124,7 +124,7 @@ "react-native-fast-image": "^8.6.3", "react-native-fs": "^2.20.0", "react-native-gesture-handler": "2.12.0", - "react-native-google-places-autocomplete": "git+https://github.com/Expensify/react-native-google-places-autocomplete.git#cef3ac29d9501091453136e1219e24c4ec9f9d76", + "react-native-google-places-autocomplete": "git+https://github.com/Expensify/react-native-google-places-autocomplete.git#c8c2a873335df19081056a5667f5c109583882e1", "react-native-haptic-feedback": "^1.13.0", "react-native-image-pan-zoom": "^2.1.12", "react-native-image-picker": "^5.1.0",