From 494570a6955ded004983786f322ff991e96eed7f Mon Sep 17 00:00:00 2001 From: Artem Makushov Date: Tue, 15 Oct 2024 16:41:20 +0200 Subject: [PATCH] update detailsStep --- src/pages/workspace/companyCards/addNew/DetailsStep.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pages/workspace/companyCards/addNew/DetailsStep.tsx b/src/pages/workspace/companyCards/addNew/DetailsStep.tsx index e2ef2cddaefb..4e0d1abf5c8c 100644 --- a/src/pages/workspace/companyCards/addNew/DetailsStep.tsx +++ b/src/pages/workspace/companyCards/addNew/DetailsStep.tsx @@ -23,7 +23,8 @@ function DetailsStep() { const {inputCallbackRef} = useAutoFocusInput(); const [addNewCard] = useOnyx(ONYXKEYS.ADD_NEW_COMPANY_CARD); - const feedProvider = addNewCard?.data.cardType; + const feedProvider = addNewCard?.data?.cardType; + const isStripeFeedProvider = feedProvider === CONST.COMPANY_CARDS.CARD_TYPE.STRIPE; const submit = () => {}; const handleBackButtonPress = () => { @@ -140,7 +141,7 @@ function DetailsStep() { contentContainerStyle={styles.flexGrow1} > - {feedProvider && feedProvider !== CONST.COMPANY_CARDS.CARD_TYPE.STRIPE ? translate(`workspace.companyCards.addNewCard.feedDetails.${feedProvider}.title`) : ''} + {feedProvider && !isStripeFeedProvider ? translate(`workspace.companyCards.addNewCard.feedDetails.${feedProvider}.title`) : ''}