Skip to content

Commit 760a288

Browse files
author
Nabi Ebrahimi
committed
Apply suggested code changes from review.
1 parent 2285d94 commit 760a288

3 files changed

Lines changed: 3 additions & 8 deletions

File tree

src/libs/ReportUtils.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9930,8 +9930,7 @@ function createDraftTransactionAndNavigateToParticipantSelector(
99309930
}
99319931

99329932
if (actionName === CONST.IOU.ACTION.SHARE) {
9933-
const backTo = Navigation.getActiveRoute();
9934-
Navigation.navigate(ROUTES.MONEY_REQUEST_ACCOUNTANT.getRoute(actionName, CONST.IOU.TYPE.SUBMIT, transactionID, reportID, backTo));
9933+
Navigation.navigate(ROUTES.MONEY_REQUEST_ACCOUNTANT.getRoute(actionName, CONST.IOU.TYPE.SUBMIT, transactionID, reportID, Navigation.getActiveRoute()));
99359934
return;
99369935
}
99379936

src/pages/iou/request/step/IOURequestStepAccountant.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ function IOURequestStepAccountant({
3838
createDraftWorkspaceAndNavigateToConfirmationScreen(transactionID, action);
3939
return;
4040
}
41-
42-
const nextBackTo = Navigation.getActiveRoute();
43-
Navigation.navigate(ROUTES.MONEY_REQUEST_STEP_PARTICIPANTS.getRoute(iouType, transactionID, reportID, nextBackTo, action));
41+
Navigation.navigate(ROUTES.MONEY_REQUEST_STEP_PARTICIPANTS.getRoute(iouType, transactionID, reportID, Navigation.getActiveRoute(), action));
4442
}, [iouType, transactionID, reportID, action, currentUserLogin]);
4543

4644
const navigateBack = useCallback(() => {

src/pages/iou/request/step/IOURequestStepParticipants.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,6 @@ function IOURequestStepParticipants({
246246
return;
247247
}
248248

249-
const nextBackTo = Navigation.getActiveRoute();
250-
251249
// If coming from the combined submit/track flow and the user proceeds to submit the expense
252250
// we will use the submit IOU type in the confirmation flow.
253251
const iouConfirmationPageRoute = ROUTES.MONEY_REQUEST_STEP_CONFIRMATION.getRoute(
@@ -257,7 +255,7 @@ function IOURequestStepParticipants({
257255
newReportID,
258256
undefined,
259257
undefined,
260-
nextBackTo,
258+
Navigation.getActiveRoute(),
261259
);
262260

263261
const route = isCategorizing

0 commit comments

Comments
 (0)