Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Missing PayPal account when trying to delete it #7571

Merged
merged 5 commits into from
Feb 9, 2022
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/pages/settings/Payments/PaymentsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,9 @@ class PaymentsPage extends React.Component {

render() {
const isPayPalMeSelected = this.state.formattedSelectedPaymentMethod.type === CONST.PAYMENT_METHODS.PAYPAL;

// determine if the popover appears from the bottom of the screen or not.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking for a more detailed comment, something along the lines of
Determines whether or not the modal popup is mounted from the bottom of the screen instead of the side mount on Web or Desktop screens

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks better, i update it now

const isPopoverBottomMount = this.state.anchorPositionTop === 0 || this.props.isSmallScreenWidth;
return (
<ScreenWrapper>
<KeyboardAvoidingView>
Expand Down Expand Up @@ -290,7 +293,7 @@ class PaymentsPage extends React.Component {
!this.props.isSmallScreenWidth ? styles.sidebarPopover : '',
]}
>
{this.props.isSmallScreenWidth && (
{isPopoverBottomMount && (
<MenuItem
title={this.state.formattedSelectedPaymentMethod.title}
icon={this.state.formattedSelectedPaymentMethod.icon}
Expand Down