feat: remove all donation options on /donate but $5 (#40309)
parent
79e3cb51e5
commit
00849387c0
|
@ -234,6 +234,20 @@ class DonateForm extends Component {
|
|||
));
|
||||
}
|
||||
|
||||
renderDonationDescription() {
|
||||
const { donationAmount, donationDuration } = this.state;
|
||||
return (
|
||||
<p className='donation-description'>
|
||||
{`Your `}
|
||||
{this.getFormatedAmountLabel(donationAmount)}
|
||||
{` donation will provide `}
|
||||
{this.convertToTimeContributed(donationAmount)}
|
||||
{` of learning to people around the world`}
|
||||
{donationDuration === 'onetime' ? `.` : ` each ${donationDuration}.`}
|
||||
</p>
|
||||
);
|
||||
}
|
||||
|
||||
renderDurationAmountOptions() {
|
||||
const { donationAmount, donationDuration, processing } = this.state;
|
||||
return !processing ? (
|
||||
|
@ -267,14 +281,7 @@ class DonateForm extends Component {
|
|||
{this.renderAmountButtons(duration)}
|
||||
</ToggleButtonGroup>
|
||||
<Spacer />
|
||||
<p className='donation-description'>
|
||||
{`Your `}
|
||||
{this.getFormatedAmountLabel(donationAmount)}
|
||||
{` donation will provide `}
|
||||
{this.convertToTimeContributed(donationAmount)}
|
||||
{` of learning to people around the world`}
|
||||
{duration === 'onetime' ? `.` : ` each ${duration}.`}
|
||||
</p>
|
||||
{this.renderDonationDescription()}
|
||||
</div>
|
||||
</Tab>
|
||||
))}
|
||||
|
@ -383,7 +390,7 @@ class DonateForm extends Component {
|
|||
renderPageForm() {
|
||||
return (
|
||||
<Row>
|
||||
<Col xs={12}>{this.renderDurationAmountOptions()}</Col>
|
||||
<Col xs={12}>{this.renderDonationDescription()}</Col>
|
||||
<Col xs={12}>{this.renderDonationOptions()}</Col>
|
||||
</Row>
|
||||
);
|
||||
|
|
|
@ -407,3 +407,8 @@ button#confirm-donation-btn:hover {
|
|||
margin-right: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.donate-page-wrapper .alert.alert-info a:hover {
|
||||
color: #327290;
|
||||
background-color: #acdef3;
|
||||
}
|
||||
|
|
|
@ -101,13 +101,15 @@ export class DonatePage extends Component {
|
|||
</p>
|
||||
<br />
|
||||
<p>
|
||||
If you would like to make additional donations, those will
|
||||
help our nonprofit and our mission, too.
|
||||
You can make an additional one-time donation of any amount
|
||||
using this link:{' '}
|
||||
<a href='https://www.paypal.me/freecodecamp'>
|
||||
https://www.paypal.me/freecodecamp
|
||||
</a>
|
||||
</p>
|
||||
</Alert>
|
||||
) : null}
|
||||
<DonateText isDonating={isDonating} />
|
||||
<Spacer />
|
||||
<DonateForm
|
||||
enableDonationSettingsPage={this.enableDonationSettingsPage}
|
||||
handleProcessing={this.handleProcessing}
|
||||
|
|
|
@ -8,8 +8,7 @@ const amountsConfig = {
|
|||
onetime: [2500, 5000, 7500, 10000, 15000]
|
||||
};
|
||||
const defaultAmount = {
|
||||
month: 1000,
|
||||
onetime: 2500
|
||||
month: 500
|
||||
};
|
||||
const defaultDonation = {
|
||||
donationAmount: defaultAmount['month'],
|
||||
|
|
Loading…
Reference in New Issue