From 65950fec5985bb08f272b71b239e1490be7f8050 Mon Sep 17 00:00:00 2001 From: Nicolay Arefyeu Date: Wed, 4 Dec 2024 16:26:16 +0200 Subject: [PATCH] Fix going back from card provider in Company cards --- src/pages/workspace/companyCards/addNew/CardTypeStep.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pages/workspace/companyCards/addNew/CardTypeStep.tsx b/src/pages/workspace/companyCards/addNew/CardTypeStep.tsx index 47f09d71dcfe..26899ed9e50f 100644 --- a/src/pages/workspace/companyCards/addNew/CardTypeStep.tsx +++ b/src/pages/workspace/companyCards/addNew/CardTypeStep.tsx @@ -89,7 +89,11 @@ function CardTypeStep() { }, [addNewCard?.data.feedType]); const handleBackButtonPress = () => { - CompanyCards.setAddNewCompanyCardStepAndData({step: CONST.COMPANY_CARDS.STEP.SELECT_BANK}); + if (isOtherBankSelected) { + CompanyCards.setAddNewCompanyCardStepAndData({step: CONST.COMPANY_CARDS.STEP.SELECT_BANK}); + return; + } + CompanyCards.setAddNewCompanyCardStepAndData({step: CONST.COMPANY_CARDS.STEP.SELECT_FEED_TYPE}); }; return (