Skip to content

Commit

Permalink
Remove IOUCurrencySelection and update IOURequestStepCurrency PART-5
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhenjaHorbach committed Jan 28, 2024
1 parent 42b31bb commit 680e555
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/pages/EditRequestAmountPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import useLocalize from '@hooks/useLocalize';
import * as DeviceCapabilities from '@libs/DeviceCapabilities';
import Navigation from '@libs/Navigation/Navigation';
import CONST from '@src/CONST';
import ROUTES from '@src/ROUTES';
import MoneyRequestAmountForm from './iou/steps/MoneyRequestAmountForm';

const propTypes = {
Expand Down Expand Up @@ -41,6 +42,10 @@ function EditRequestAmountPage({defaultAmount, defaultCurrency, onNavigateToCurr
}, []),
);

const navigateBack = () => {
Navigation.goBack(ROUTES.HOME);
};

return (
<ScreenWrapper
includeSafeAreaPaddingBottom={false}
Expand All @@ -50,7 +55,7 @@ function EditRequestAmountPage({defaultAmount, defaultCurrency, onNavigateToCurr
>
<HeaderWithBackButton
title={translate('iou.amount')}
onBackButtonPress={Navigation.dismissModal}
onBackButtonPress={navigateBack}
/>
<MoneyRequestAmountForm
currency={defaultCurrency}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/iou/request/step/IOURequestStepCurrency.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function IOURequestStepCurrency({
if (selectedCurrency) {
Navigation.navigate(`${backTo}?currency=${selectedCurrency}`);
} else {
Navigation.navigate(backTo);
Navigation.goBack(backTo || ROUTES.HOME);
}
return;
}
Expand Down

0 comments on commit 680e555

Please sign in to comment.