diff --git a/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardBankAccounts.tsx b/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardBankAccounts.tsx index e121de7fd159..9e2daeda5ee0 100644 --- a/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardBankAccounts.tsx +++ b/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardBankAccounts.tsx @@ -15,7 +15,9 @@ import * as CardUtils from '@libs/CardUtils'; import * as PolicyUtils from '@libs/PolicyUtils'; import Navigation from '@navigation/Navigation'; import type {SettingsNavigatorParamList} from '@navigation/types'; +import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper'; import * as Card from '@userActions/Card'; +import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; import ROUTES from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; @@ -74,26 +76,32 @@ function WorkspaceExpensifyCardBankAccounts({route}: WorkspaceExpensifyCardBankA }; return ( - - Navigation.goBack()} - title={translate('workspace.expensifyCard.chooseBankAccount')} - /> - - {translate('workspace.expensifyCard.chooseExistingBank')} - {renderBankOptions()} - + Navigation.goBack()} + title={translate('workspace.expensifyCard.chooseBankAccount')} /> - - + + {translate('workspace.expensifyCard.chooseExistingBank')} + {renderBankOptions()} + + + + ); } diff --git a/src/pages/workspace/expensifyCard/issueNew/IssueNewCardPage.tsx b/src/pages/workspace/expensifyCard/issueNew/IssueNewCardPage.tsx index b10e1cb18e33..3b777765c7b8 100644 --- a/src/pages/workspace/expensifyCard/issueNew/IssueNewCardPage.tsx +++ b/src/pages/workspace/expensifyCard/issueNew/IssueNewCardPage.tsx @@ -2,6 +2,7 @@ import type {StackScreenProps} from '@react-navigation/stack'; import React, {useEffect} from 'react'; import {useOnyx} from 'react-native-onyx'; import type {SettingsNavigatorParamList} from '@navigation/types'; +import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper'; import type {WithPolicyAndFullscreenLoadingProps} from '@pages/workspace/withPolicyAndFullscreenLoading'; import withPolicyAndFullscreenLoading from '@pages/workspace/withPolicyAndFullscreenLoading'; import * as Card from '@userActions/Card'; @@ -29,27 +30,39 @@ function IssueNewCardPage({policy, route}: IssueNewCardPageProps) { Card.startIssueNewCardFlow(policyID); }, [policyID]); - switch (currentStep) { - case CONST.EXPENSIFY_CARD.STEP.ASSIGNEE: - return ; - case CONST.EXPENSIFY_CARD.STEP.CARD_TYPE: - return ; - case CONST.EXPENSIFY_CARD.STEP.LIMIT_TYPE: - return ; - case CONST.EXPENSIFY_CARD.STEP.LIMIT: - return ; - case CONST.EXPENSIFY_CARD.STEP.CARD_NAME: - return ; - case CONST.EXPENSIFY_CARD.STEP.CONFIRMATION: - return ( - - ); - default: - return ; - } + const getCurrentStep = () => { + switch (currentStep) { + case CONST.EXPENSIFY_CARD.STEP.ASSIGNEE: + return ; + case CONST.EXPENSIFY_CARD.STEP.CARD_TYPE: + return ; + case CONST.EXPENSIFY_CARD.STEP.LIMIT_TYPE: + return ; + case CONST.EXPENSIFY_CARD.STEP.LIMIT: + return ; + case CONST.EXPENSIFY_CARD.STEP.CARD_NAME: + return ; + case CONST.EXPENSIFY_CARD.STEP.CONFIRMATION: + return ( + + ); + default: + return ; + } + }; + + return ( + + {getCurrentStep()} + + ); } IssueNewCardPage.displayName = 'IssueNewCardPage';