fix: hide stripe form when isDonating (#38034)

This commit is contained in:
Ahmad Abdolsaheb
2020-01-09 16:27:04 +03:00
committed by mrugesh
parent fd36d6db37
commit b64048fe13

View File

@ -67,7 +67,7 @@ export class DonatePage extends Component {
render() {
const { stripe } = this.state;
const { showLoading } = this.props;
const { showLoading, isDonating } = this.props;
if (showLoading) {
return <Loader fullScreen={true} />;
@ -80,11 +80,21 @@ export class DonatePage extends Component {
<Spacer />
<Row>
<Col sm={10} smOffset={1} xs={12}>
<h1 className='text-center'>Become a Supporter</h1>
<h1 className='text-center'>
{isDonating
? 'Thank You for Your Support'
: 'Become a Supporter'}
</h1>
<Spacer />
</Col>
</Row>
<Row>
{isDonating ? (
<Col md={6} mdOffset={3}>
<DonateText />
</Col>
) : (
<Fragment>
<Col md={6}>
<DonateForm
enableDonationSettingsPage={this.enableDonationSettingsPage}
@ -94,6 +104,8 @@ export class DonatePage extends Component {
<Col md={6}>
<DonateText />
</Col>
</Fragment>
)}
</Row>
<Spacer />
</Grid>