Skip to content

Commit

Permalink
Merge pull request #6672 from Expensify/nmurray-cp-personal-bank-keyb…
Browse files Browse the repository at this point in the history
…oard-avoid

[CP Stg] Wrap AddPersonalBankAccount with KeyboardAvoidingView
  • Loading branch information
marcaaron authored Dec 9, 2021
2 parents 6734c9b + 5af51c9 commit 9a27ef2
Showing 1 changed file with 18 additions and 15 deletions.
33 changes: 18 additions & 15 deletions src/pages/AddPersonalBankAccountPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import AddPlaidBankAccount from '../components/AddPlaidBankAccount';
import getPlaidOAuthReceivedRedirectURI from '../libs/getPlaidOAuthReceivedRedirectURI';
import compose from '../libs/compose';
import ONYXKEYS from '../ONYXKEYS';
import KeyboardAvoidingView from '../components/KeyboardAvoidingView';

const propTypes = {
...withLocalizePropTypes,
Expand All @@ -24,21 +25,23 @@ const defaultProps = {

const AddPersonalBankAccountPage = props => (
<ScreenWrapper>
<HeaderWithCloseButton
title={props.translate('bankAccount.addBankAccount')}
onCloseButtonPress={Navigation.dismissModal}
shouldShowBackButton
onBackButtonPress={() => Navigation.goBack()}
/>
<AddPlaidBankAccount
onSubmit={({account, password, plaidLinkToken}) => {
BankAccounts.addPersonalBankAccount(account, password, plaidLinkToken);
}}
onExitPlaid={Navigation.dismissModal}
receivedRedirectURI={getPlaidOAuthReceivedRedirectURI()}
plaidLinkOAuthToken={props.plaidLinkToken}
isPasswordRequired
/>
<KeyboardAvoidingView>
<HeaderWithCloseButton
title={props.translate('bankAccount.addBankAccount')}
onCloseButtonPress={Navigation.dismissModal}
shouldShowBackButton
onBackButtonPress={() => Navigation.goBack()}
/>
<AddPlaidBankAccount
onSubmit={({account, password, plaidLinkToken}) => {
BankAccounts.addPersonalBankAccount(account, password, plaidLinkToken);
}}
onExitPlaid={Navigation.dismissModal}
receivedRedirectURI={getPlaidOAuthReceivedRedirectURI()}
plaidLinkOAuthToken={props.plaidLinkToken}
isPasswordRequired
/>
</KeyboardAvoidingView>
</ScreenWrapper>
);

Expand Down

0 comments on commit 9a27ef2

Please sign in to comment.