Skip to content

Commit

Permalink
make requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
marcaaron committed Jun 10, 2021
1 parent 108674f commit 6b3d5f5
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 8 deletions.
14 changes: 9 additions & 5 deletions src/components/AddPlaidBankAccount.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import React from 'react';
import {
ActivityIndicator,
View,
Text,
TextInput,
} from 'react-native';
import PropTypes from 'prop-types';
Expand All @@ -24,6 +23,7 @@ import Button from './Button';
import Picker from './Picker';
import Icon from './Icon';
import {DownArrow} from './Icon/Expensicons';
import Text from './Text';

const propTypes = {
...withLocalizePropTypes,
Expand All @@ -45,6 +45,9 @@ const propTypes = {

/** Fired when the user selects an account and submits the form */
onSubmit: PropTypes.func,

/** Additional text to display */
text: PropTypes.string,
};

const defaultProps = {
Expand All @@ -54,6 +57,7 @@ const defaultProps = {
},
onExitPlaid: () => {},
onSubmit: () => {},
text: '',
};

class AddPlaidBankAccount extends React.Component {
Expand Down Expand Up @@ -119,10 +123,10 @@ class AddPlaidBankAccount extends React.Component {
onError={(error) => {
console.debug(`Plaid Error: ${error.message}`);
}}
onExit={() => {
// User prematurely exited the Plaid flow
this.props.onExitPlaid();
}}

// User prematurely exited the Plaid flow
// eslint-disable-next-line react/jsx-props-no-multi-spaces
onExit={this.props.onExitPlaid}
/>
)}
{accounts.length > 0 && (
Expand Down
1 change: 1 addition & 0 deletions src/components/CheckboxWithLabel.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,6 @@ const CheckboxWithLabel = ({

CheckboxWithLabel.propTypes = propTypes;
CheckboxWithLabel.defaultProps = defaultProps;
CheckboxWithLabel.displayName = 'CheckboxWithLabel';

export default CheckboxWithLabel;
1 change: 1 addition & 0 deletions src/languages/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ export default {
toGetStarted: 'To get started with the Expensify Card, you first need to add a bank account.',
plaidBodyCopy: 'Give your employees an easier way to pay - and get paid back - for company expenses.',
checkHelpLine: 'Your routing number and account number can be found on a check for the account.',
iAcceptThe: 'I accept the ',
},
addPersonalBankAccountPage: {
enterPassword: 'Enter password',
Expand Down
1 change: 1 addition & 0 deletions src/languages/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ export default {
toGetStarted: 'Para comenzar con la tarjeta Expensify, primero debe agregar una cuenta bancaria.',
plaidBodyCopy: 'Ofrezca a sus empleados una forma más sencilla de pagar - y recuperar - los gastos de la empresa.',
checkHelpLine: 'Su número de ruta y número de cuenta se pueden encontrar en un cheque para la cuenta.',
iAcceptThe: 'Acepto los ',
},
addPersonalBankAccountPage: {
enterPassword: 'Escribe una contraseña',
Expand Down
6 changes: 4 additions & 2 deletions src/pages/BusinessBankAccount/NewPage.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import _ from 'underscore';
import React from 'react';
import PropTypes from 'prop-types';
import {View, Text, Image} from 'react-native';
import {View, Image} from 'react-native';
import {withOnyx} from 'react-native-onyx';
import ScreenWrapper from '../../components/ScreenWrapper';
import HeaderWithCloseButton from '../../components/HeaderWithCloseButton';
Expand All @@ -22,6 +22,7 @@ import CheckboxWithLabel from '../../components/CheckboxWithLabel';
import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize';
import compose from '../../libs/compose';
import exampleCheckImage from '../../../assets/images/example-check-image.png';
import Text from '../../components/Text';

const propTypes = {
/** List of betas */
Expand Down Expand Up @@ -69,6 +70,7 @@ class BusinessBankAccountNewPage extends React.Component {

render() {
if (!Permissions.canUseFreePlan(this.props.betas)) {
console.debug('Not showing new bank account page because user is not on free plan beta');
Navigation.dismissModal();
return null;
}
Expand Down Expand Up @@ -164,7 +166,7 @@ class BusinessBankAccountNewPage extends React.Component {
LabelComponent={() => (
<View style={[styles.flexRow, styles.alignItemsCenter]}>
<Text>
{'I accept the '}
{this.props.translate('bankAccount.iAcceptThe')}
</Text>
<TextLink href="https://use.expensify.com/terms">
{`Expensify ${this.props.translate('common.termsOfService')}`}
Expand Down
3 changes: 2 additions & 1 deletion src/pages/EnablePayments/TermsStep.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import {
View, ScrollView, Text,
View, ScrollView,
} from 'react-native';
import {withOnyx} from 'react-native-onyx';
import PropTypes from 'prop-types';
Expand All @@ -16,6 +16,7 @@ import TextLink from '../../components/TextLink';
import compose from '../../libs/compose';
import ONYXKEYS from '../../ONYXKEYS';
import CheckboxWithLabel from '../../components/CheckboxWithLabel';
import Text from '../../components/Text';

const propTypes = {
/** Comes from Onyx. Information about the terms for the wallet */
Expand Down

0 comments on commit 6b3d5f5

Please sign in to comment.