Skip to content

Commit

Permalink
clean condition
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanDylann committed Oct 29, 2024
1 parent 4bf4988 commit 8ab57e6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ function WorkspaceExpensifyCardPageEmptyState({route, policy}: WorkspaceExpensif
const isSetupUnfinished = !eligibleBankAccounts.length && reimbursementAccountStatus && reimbursementAccountStatus !== CONST.BANK_ACCOUNT.STATE.OPEN;

const startFlow = useCallback(() => {
if (!eligibleBankAccounts.length || isSetupUnfinished) {
if (!eligibleBankAccounts.length) {
Navigation.navigate(ROUTES.BANK_ACCOUNT_WITH_STEP_TO_OPEN.getRoute('new', policy?.id, ROUTES.WORKSPACE_EXPENSIFY_CARD.getRoute(policy?.id ?? '-1')));
} else {
Navigation.navigate(ROUTES.WORKSPACE_EXPENSIFY_CARD_BANK_ACCOUNT.getRoute(policy?.id ?? '-1'));
}
}, [eligibleBankAccounts.length, isSetupUnfinished, policy?.id]);
}, [eligibleBankAccounts.length, policy?.id]);

const confirmCurrencyChangeAndHideModal = useCallback(() => {
if (!policy) {
Expand Down

0 comments on commit 8ab57e6

Please sign in to comment.