Skip to content

Commit 56fd68c

Browse files
committed
close RHP before navigating to statement close date page
1 parent 4090653 commit 56fd68c

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

src/pages/workspace/companyCards/BankConnection/index.native.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ function BankConnection({policyID: policyIDFromProps, feed, route}: BankConnecti
118118
// Direct feeds (except those added via Plaid) are created with default statement period end date.
119119
// Redirect the user to set a custom date.
120120
if (policyID && !isPlaid) {
121+
Navigation.closeRHPFlow();
121122
Navigation.navigate(ROUTES.WORKSPACE_COMPANY_CARDS_SETTINGS_STATEMENT_CLOSE_DATE.getRoute(policyID));
122123
} else {
123124
Navigation.goBack(ROUTES.WORKSPACE_COMPANY_CARDS.getRoute(policyID));

src/pages/workspace/companyCards/BankConnection/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,14 @@ function BankConnection({policyID: policyIDFromProps, feed, route}: BankConnecti
145145
if (newFeed) {
146146
updateSelectedFeed(newFeed, policyID);
147147
}
148-
Navigation.closeRHPFlow();
149148

150149
// Direct feeds (except those added via Plaid) are created with default statement period end date.
151150
// Redirect the user to set a custom date.
152151
if (policyID && !isPlaid) {
152+
Navigation.closeRHPFlow();
153153
Navigation.navigate(ROUTES.WORKSPACE_COMPANY_CARDS_SETTINGS_STATEMENT_CLOSE_DATE.getRoute(policyID));
154154
} else {
155+
Navigation.closeRHPFlow();
155156
Navigation.navigate(ROUTES.WORKSPACE_COMPANY_CARDS.getRoute(policyID), {forceReplace: true});
156157
}
157158
return;

0 commit comments

Comments
 (0)