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() { render() {
const { stripe } = this.state; const { stripe } = this.state;
const { showLoading } = this.props; const { showLoading, isDonating } = this.props;
if (showLoading) { if (showLoading) {
return <Loader fullScreen={true} />; return <Loader fullScreen={true} />;
@ -80,20 +80,32 @@ export class DonatePage extends Component {
<Spacer /> <Spacer />
<Row> <Row>
<Col sm={10} smOffset={1} xs={12}> <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 /> <Spacer />
</Col> </Col>
</Row> </Row>
<Row> <Row>
<Col md={6}> {isDonating ? (
<DonateForm <Col md={6} mdOffset={3}>
enableDonationSettingsPage={this.enableDonationSettingsPage} <DonateText />
stripe={stripe} </Col>
/> ) : (
</Col> <Fragment>
<Col md={6}> <Col md={6}>
<DonateText /> <DonateForm
</Col> enableDonationSettingsPage={this.enableDonationSettingsPage}
stripe={stripe}
/>
</Col>
<Col md={6}>
<DonateText />
</Col>
</Fragment>
)}
</Row> </Row>
<Spacer /> <Spacer />
</Grid> </Grid>