Skip to content

Commit

Permalink
clear values on start confirm
Browse files Browse the repository at this point in the history
  • Loading branch information
rezkiy37 committed Oct 4, 2023
1 parent 773b8a7 commit df19f03
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/pages/iou/steps/MoneyRequestConfirmPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ function MoneyRequestConfirmPage(props) {
const isPolicyExpenseChat = useMemo(() => ReportUtils.isPolicyExpenseChat(ReportUtils.getRootParentReport(props.report)), [props.report]);
const isManualRequestDM = props.selectedTab === CONST.TAB.MANUAL && iouType.current === CONST.IOU.MONEY_REQUEST_TYPE.REQUEST;

useEffect(() => {
IOU.resetMoneyRequestCategory();
IOU.resetMoneyRequestTag();
}, []);

useEffect(() => {
const policyExpenseChat = _.find(participants, (participant) => participant.isPolicyExpenseChat);
if (policyExpenseChat) {
Expand Down Expand Up @@ -117,15 +122,11 @@ function MoneyRequestConfirmPage(props) {

const navigateBack = () => {
let fallback;

if (reportID.current) {
fallback = ROUTES.MONEY_REQUEST.getRoute(iouType.current, reportID.current);
} else {
fallback = ROUTES.MONEY_REQUEST_PARTICIPANTS.getRoute(iouType.current);
}

IOU.resetMoneyRequestCategory();

Navigation.goBack(fallback);
};

Expand Down

0 comments on commit df19f03

Please sign in to comment.