Skip to content

Commit

Permalink
improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
narefyev91 committed Oct 15, 2024
1 parent ab61ef3 commit e61e96b
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,16 @@ function CardInstructionsStep() {

const data = addNewCard?.data;
const feedProvider = data?.cardType;
const isAmexFeedProvider = feedProvider === CONST.COMPANY_CARDS.CARD_TYPE.AMEX;

const submit = () => {
CompanyCards.setAddNewCompanyCardStepAndData({
step: feedProvider === CONST.COMPANY_CARDS.CARD_TYPE.AMEX ? CONST.COMPANY_CARDS.STEP.CARD_DETAILS : CONST.COMPANY_CARDS.STEP.CARD_NAME,
step: isAmexFeedProvider ? CONST.COMPANY_CARDS.STEP.CARD_DETAILS : CONST.COMPANY_CARDS.STEP.CARD_NAME,
});
};

const handleBackButtonPress = () => {
if (canUseDirectFeeds && feedProvider === CONST.COMPANY_CARDS.CARD_TYPE.AMEX) {
if (canUseDirectFeeds && isAmexFeedProvider) {
CompanyCards.setAddNewCompanyCardStepAndData({
step: CONST.COMPANY_CARDS.STEP.AMEX_CUSTOM_FEED,
});
Expand Down

0 comments on commit e61e96b

Please sign in to comment.