From 6d0ded7c42b0bfaf2c72a683757a62973c4e09ed Mon Sep 17 00:00:00 2001 From: Daniel Gale-Rosen Date: Mon, 3 Jul 2023 15:40:15 -0400 Subject: [PATCH 1/3] switch to route that actually exists --- src/pages/iou/IOUCurrencySelection.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/iou/IOUCurrencySelection.js b/src/pages/iou/IOUCurrencySelection.js index 08185e0420ab..a9d63d26da3b 100644 --- a/src/pages/iou/IOUCurrencySelection.js +++ b/src/pages/iou/IOUCurrencySelection.js @@ -114,8 +114,8 @@ function IOUCurrencySelection(props) { <> Navigation.goBack(ROUTES.getIouRequestRoute(Navigation.getTopmostReportId()))} - /> + onBackButtonPress={() => Navigation.goBack(ROUTES.getMoneyRequestRoute(Navigation.getTopmostReportId()))} + /> Date: Mon, 3 Jul 2023 15:50:51 -0400 Subject: [PATCH 2/3] add back parameters --- src/pages/iou/IOUCurrencySelection.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pages/iou/IOUCurrencySelection.js b/src/pages/iou/IOUCurrencySelection.js index a9d63d26da3b..e3a895554aa0 100644 --- a/src/pages/iou/IOUCurrencySelection.js +++ b/src/pages/iou/IOUCurrencySelection.js @@ -56,6 +56,8 @@ const defaultProps = { function IOUCurrencySelection(props) { const [searchValue, setSearchValue] = useState(''); const selectedCurrencyCode = lodashGet(props.route, 'params.currency', props.iou.currency, CONST.CURRENCY.USD); + const iouType = lodashGet(props.route, 'params.iouType', CONST.IOU.MONEY_REQUEST_TYPE.REQUEST); + const reportID = lodashGet(props.route, 'params.reportID', ''); const confirmCurrencySelection = useCallback( (option) => { @@ -114,7 +116,7 @@ function IOUCurrencySelection(props) { <> Navigation.goBack(ROUTES.getMoneyRequestRoute(Navigation.getTopmostReportId()))} + onBackButtonPress={() => Navigation.goBack(ROUTES.getMoneyRequestRoute(iouType, reportID))} /> Date: Mon, 3 Jul 2023 16:01:55 -0400 Subject: [PATCH 3/3] prettier --- src/pages/iou/IOUCurrencySelection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/iou/IOUCurrencySelection.js b/src/pages/iou/IOUCurrencySelection.js index e3a895554aa0..c8ff1cdd74d2 100644 --- a/src/pages/iou/IOUCurrencySelection.js +++ b/src/pages/iou/IOUCurrencySelection.js @@ -117,7 +117,7 @@ function IOUCurrencySelection(props) { Navigation.goBack(ROUTES.getMoneyRequestRoute(iouType, reportID))} - /> + />