Skip to content

Commit

Permalink
Merge pull request #31629 from software-mansion-labs/form-migration/b…
Browse files Browse the repository at this point in the history
…ank-account-plaid-step

[Form Provider Refactor] BankAccountPlaidStep
  • Loading branch information
luacmartins authored Nov 27, 2023
2 parents d16ef94 + 2ccb5e9 commit 84c3b7a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/pages/ReimbursementAccount/BankAccountPlaidStep.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import {withOnyx} from 'react-native-onyx';
import _ from 'underscore';
import AddPlaidBankAccount from '@components/AddPlaidBankAccount';
import CheckboxWithLabel from '@components/CheckboxWithLabel';
import Form from '@components/Form';
import FormProvider from '@components/Form/FormProvider';
import InputWrapper from '@components/Form/InputWrapper';
import HeaderWithBackButton from '@components/HeaderWithBackButton';
import ScreenWrapper from '@components/ScreenWrapper';
import Text from '@components/Text';
Expand Down Expand Up @@ -99,7 +100,7 @@ function BankAccountPlaidStep(props) {
guidesCallTaskID={CONST.GUIDES_CALL_TASK_IDS.WORKSPACE_BANK_ACCOUNT}
onBackButtonPress={onBackButtonPress}
/>
<Form
<FormProvider
formID={ONYXKEYS.REIMBURSEMENT_ACCOUNT}
validate={validate}
onSubmit={submit}
Expand All @@ -122,7 +123,8 @@ function BankAccountPlaidStep(props) {
selectedPlaidAccountID={selectedPlaidAccountID}
/>
{Boolean(selectedPlaidAccountID) && !_.isEmpty(lodashGet(plaidData, 'bankAccounts')) && (
<CheckboxWithLabel
<InputWrapper
InputComponent={CheckboxWithLabel}
accessibilityLabel={`${translate('common.iAcceptThe')} ${translate('common.expensifyTermsOfService')}`}
style={styles.mt4}
inputID="acceptTerms"
Expand All @@ -136,7 +138,7 @@ function BankAccountPlaidStep(props) {
shouldSaveDraft
/>
)}
</Form>
</FormProvider>
</ScreenWrapper>
);
}
Expand Down

0 comments on commit 84c3b7a

Please sign in to comment.