Skip to content

Commit

Permalink
fix pressing the text link causes the validation error to show up
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardoj committed Nov 12, 2024
1 parent 5e52372 commit 598158c
Showing 1 changed file with 26 additions and 31 deletions.
57 changes: 26 additions & 31 deletions src/pages/workspace/companyCards/addNew/DetailsStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,40 +172,35 @@ function DetailsStep({policyID}: DetailsStepProps) {
title={translate('workspace.companyCards.addCardFeed')}
onBackButtonPress={handleBackButtonPress}
/>
<ScrollView
style={styles.pt0}
contentContainerStyle={styles.flexGrow1}
<FormProvider
formID={ONYXKEYS.FORMS.ADD_NEW_CARD_FEED_FORM}
submitButtonText={translate('common.submit')}
onSubmit={submit}
validate={validate}
style={[styles.mh5, styles.flexGrow1]}
enabledWhenOffline
>
<Text style={[styles.textHeadlineLineHeightXXL, styles.ph5, styles.mv3]}>
<Text style={[styles.textHeadlineLineHeightXXL, styles.mv3]}>
{!!feedProvider && !isStripeFeedProvider ? translate(`workspace.companyCards.addNewCard.feedDetails.${feedProvider}.title`) : ''}
</Text>
<FormProvider
formID={ONYXKEYS.FORMS.ADD_NEW_CARD_FEED_FORM}
submitButtonText={translate('common.submit')}
onSubmit={submit}
validate={validate}
style={[styles.mh5, styles.flexGrow1]}
enabledWhenOffline
>
{renderInputs()}
{!!feedProvider && !isStripeFeedProvider && (
<View style={[styles.flexRow, styles.alignItemsCenter]}>
<Icon
src={Expensicons.QuestionMark}
width={variables.iconSizeExtraSmall}
height={variables.iconSizeExtraSmall}
fill={theme.icon}
/>
<TextLink
style={[styles.label, styles.textLineHeightNormal, styles.ml2]}
href={CONST.COMPANY_CARDS_HELP}
>
{translate(`workspace.companyCards.addNewCard.feedDetails.${feedProvider}.helpLabel`)}
</TextLink>
</View>
)}
</FormProvider>
</ScrollView>
{renderInputs()}
{!!feedProvider && !isStripeFeedProvider && (
<View style={[styles.flexRow, styles.alignItemsCenter]}>
<Icon
src={Expensicons.QuestionMark}
width={variables.iconSizeExtraSmall}
height={variables.iconSizeExtraSmall}
fill={theme.icon}
/>
<TextLink
style={[styles.label, styles.textLineHeightNormal, styles.ml2]}
href={CONST.COMPANY_CARDS_HELP}
>
{translate(`workspace.companyCards.addNewCard.feedDetails.${feedProvider}.helpLabel`)}
</TextLink>
</View>
)}
</FormProvider>
</ScreenWrapper>
);
}
Expand Down

0 comments on commit 598158c

Please sign in to comment.