feat(donate): allow mutiple donations with warning (#39066)
This commit is contained in:
committed by
GitHub
parent
be4070a73d
commit
bcf9942263
@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
|
|||||||
import { bindActionCreators } from 'redux';
|
import { bindActionCreators } from 'redux';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { createSelector } from 'reselect';
|
import { createSelector } from 'reselect';
|
||||||
import { Grid, Row, Col } from '@freecodecamp/react-bootstrap';
|
import { Grid, Row, Col, Alert } from '@freecodecamp/react-bootstrap';
|
||||||
|
|
||||||
import { stripePublicKey } from '../../config/env.json';
|
import { stripePublicKey } from '../../config/env.json';
|
||||||
import { Spacer, Loader } from '../components/helpers';
|
import { Spacer, Loader } from '../components/helpers';
|
||||||
@ -119,24 +119,35 @@ export class DonatePage extends Component {
|
|||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
<Row>
|
<Row>
|
||||||
{isDonating ? (
|
<Fragment>
|
||||||
<Col md={6} mdOffset={3}>
|
<Col md={6}>
|
||||||
|
<Row>
|
||||||
|
<Col sm={10} smOffset={1} xs={12}>
|
||||||
|
{isDonating ? (
|
||||||
|
<Alert>
|
||||||
|
<p>
|
||||||
|
Thank you for being a supporter of freeCodeCamp. You
|
||||||
|
currently have a recurring donation.
|
||||||
|
</p>
|
||||||
|
<br />
|
||||||
|
<p>
|
||||||
|
If you would like to make additional donations, those
|
||||||
|
will help our nonprofit and our mission, too.
|
||||||
|
</p>
|
||||||
|
</Alert>
|
||||||
|
) : null}
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
<DonateForm
|
||||||
|
enableDonationSettingsPage={this.enableDonationSettingsPage}
|
||||||
|
handleProcessing={this.handleProcessing}
|
||||||
|
stripe={stripe}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col md={6}>
|
||||||
<DonateText />
|
<DonateText />
|
||||||
</Col>
|
</Col>
|
||||||
) : (
|
</Fragment>
|
||||||
<Fragment>
|
|
||||||
<Col md={6}>
|
|
||||||
<DonateForm
|
|
||||||
enableDonationSettingsPage={this.enableDonationSettingsPage}
|
|
||||||
handleProcessing={this.handleProcessing}
|
|
||||||
stripe={stripe}
|
|
||||||
/>
|
|
||||||
</Col>
|
|
||||||
<Col md={6}>
|
|
||||||
<DonateText />
|
|
||||||
</Col>
|
|
||||||
</Fragment>
|
|
||||||
)}
|
|
||||||
</Row>
|
</Row>
|
||||||
<Spacer />
|
<Spacer />
|
||||||
</Grid>
|
</Grid>
|
||||||
|
Reference in New Issue
Block a user