Skip to content

Commit

Permalink
Fix bug where BankTransfer comp wasn't shown if showPayButton set to …
Browse files Browse the repository at this point in the history
…false (#1679)

* Fix bug where BankTransfer comp wasn't shown if showPayButton set to false

* removed unreachable code
  • Loading branch information
sponglord authored Aug 8, 2022
1 parent e318e36 commit 8e7dc1f
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions packages/lib/src/components/BankTransfer/BankTransfer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,14 @@ export class BankTransferElement extends UIElement<BankTransferProps> {
);
}

if (this.props.showPayButton) {
return (
<CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext}>
{this.props.showEmailAddress && (
<BankTransferInput ref={this.handleRef} {...this.props} onChange={this.setState} />
)}
return (
<CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext}>
{this.props.showEmailAddress && <BankTransferInput ref={this.handleRef} {...this.props} onChange={this.setState} />}
{this.props.showPayButton && (
<RedirectButton {...this.props} name={this.displayName} onSubmit={this.submit} payButton={this.payButton} />
</CoreProvider>
);
}

return null;
)}
</CoreProvider>
);
}
}

Expand Down

0 comments on commit 8e7dc1f

Please sign in to comment.