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