Skip to content

Commit

Permalink
Merge pull request #22135 from Expensify/dangrous-fixcurrencyselectio…
Browse files Browse the repository at this point in the history
…nbackbutton

Fix broken back button on currency select
  • Loading branch information
cristipaval authored Jul 4, 2023
2 parents c38a336 + 0c75f2e commit 1fb5319
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pages/iou/IOUCurrencySelection.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down Expand Up @@ -114,7 +116,7 @@ function IOUCurrencySelection(props) {
<>
<HeaderWithBackButton
title={translate('iOUCurrencySelection.selectCurrency')}
onBackButtonPress={() => Navigation.goBack(ROUTES.getIouRequestRoute(Navigation.getTopmostReportId()))}
onBackButtonPress={() => Navigation.goBack(ROUTES.getMoneyRequestRoute(iouType, reportID))}
/>
<OptionsSelector
sections={sections}
Expand Down

0 comments on commit 1fb5319

Please sign in to comment.