Skip to content

Commit

Permalink
Merge pull request #753 from Adyen/fix/loading-status-qrloadercontainer
Browse files Browse the repository at this point in the history
Fix loading status on QRCode components
  • Loading branch information
marcperez committed Feb 12, 2021
2 parents 2aaf6c0 + 3bd7ae0 commit 9428c76
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions packages/lib/src/components/helpers/QRLoaderContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { h } from 'preact';
import UIElement, { UIElementProps } from '../UIElement';
import QRLoader from '../internal/QRLoader';
import CoreProvider from '../../core/Context/CoreProvider';
import RedirectButton from '../internal/RedirectButton';

interface QRLoaderContainerProps extends UIElementProps {
/**
Expand Down Expand Up @@ -67,10 +68,18 @@ class QRLoaderContainer extends UIElement<QRLoaderContainerProps> {
}

if (this.props.showPayButton) {
return this.payButton({
label: this.props.buttonLabel ? this.props.i18n.get(this.props.buttonLabel) : this.props.i18n.get('continue'),
classNameModifiers: ['standalone']
});
return (
<CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext}>
<RedirectButton
name={this.displayName}
onSubmit={this.submit}
payButton={this.payButton}
ref={ref => {
this.componentRef = ref;
}}
/>
</CoreProvider>
);
}

return null;
Expand Down

0 comments on commit 9428c76

Please sign in to comment.