Skip to content

Commit

Permalink
nab updates
Browse files Browse the repository at this point in the history
  • Loading branch information
thienlnam committed Aug 12, 2022
1 parent 82a819f commit 03e912f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
11 changes: 3 additions & 8 deletions src/components/OfflineWithFeedback.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import compose from '../libs/compose';
import withLocalize, {withLocalizePropTypes} from './withLocalize';
import {withNetwork} from './OnyxProvider';
import networkPropTypes from './networkPropTypes';
import stylePropTypes from '../styles/stylePropTypes';
import Text from './Text';
import styles from '../styles/styles';
import Tooltip from './Tooltip';
Expand Down Expand Up @@ -39,16 +40,10 @@ const propTypes = {
network: networkPropTypes.isRequired,

/** Additional styles to add after local styles. Applied to the parent container */
style: PropTypes.oneOfType([
PropTypes.arrayOf(PropTypes.object),
PropTypes.object,
]),
style: stylePropTypes,

/** Additional style object for the error row */
errorRowStyles: PropTypes.oneOfType([
PropTypes.arrayOf(PropTypes.object),
PropTypes.object,
]),
errorRowStyles: stylePropTypes,

...withLocalizePropTypes,
};
Expand Down
10 changes: 5 additions & 5 deletions src/pages/settings/InitialSettingsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,18 +88,18 @@ const defaultProps = {
};

const InitialSettingsPage = (props) => {
const walletBalance = props.numberFormat(
props.userWallet.currentBalance / 100, // Divide by 100 because balance is in cents
{style: 'currency', currency: 'USD'},
);

// On the very first sign in or after clearing storage these
// details will not be present on the first render so we'll just
// return nothing for now.
if (_.isEmpty(props.currentUserPersonalDetails)) {
return null;
}

const walletBalance = props.numberFormat(
props.userWallet.currentBalance / 100, // Divide by 100 because balance is in cents
{style: 'currency', currency: 'USD'},
);

const defaultMenuItems = [
{
translationKey: 'common.profile',
Expand Down
7 changes: 6 additions & 1 deletion src/pages/settings/Payments/PaymentMethodList.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,12 @@ class PaymentMethodList extends Component {
renderItem({item}) {
if (item.type === MENU_ITEM) {
return (
<OfflineWithFeedback onClose={() => this.dismissError(item)} pendingAction={item.pendingAction} errors={item.errors} errorRowStyles={styles.ph6}>
<OfflineWithFeedback
onClose={() => this.dismissError(item)}
pendingAction={item.pendingAction}
errors={item.errors}
errorRowStyles={styles.ph6}
>
<MenuItem
onPress={item.onPress}
title={item.title}
Expand Down

0 comments on commit 03e912f

Please sign in to comment.