fix(donate): adjust verbiage and time contibuted
This commit is contained in:
@ -96,8 +96,12 @@ class DonateForm extends Component {
|
|||||||
: this.amounts[durationSelected][0];
|
: this.amounts[durationSelected][0];
|
||||||
}
|
}
|
||||||
|
|
||||||
convertToTimeContributed(amount) {
|
convertToTimeContributed(amount, duration) {
|
||||||
return `${numToCommas((amount / 100) * 50 * 60)} minutes`;
|
const timeContributed =
|
||||||
|
duration === 'month'
|
||||||
|
? Math.round(((amount / 100) * 50) / 12)
|
||||||
|
: (amount / 100) * 50;
|
||||||
|
return `${numToCommas(timeContributed)} hours`;
|
||||||
}
|
}
|
||||||
|
|
||||||
getFormatedAmountLabel(amount) {
|
getFormatedAmountLabel(amount) {
|
||||||
@ -183,10 +187,9 @@ class DonateForm extends Component {
|
|||||||
{`Your `}
|
{`Your `}
|
||||||
{this.getFormatedAmountLabel(donationAmount)}
|
{this.getFormatedAmountLabel(donationAmount)}
|
||||||
{` donation will provide `}
|
{` donation will provide `}
|
||||||
{this.convertToTimeContributed(donationAmount)}
|
{this.convertToTimeContributed(donationAmount, duration)}
|
||||||
{` of learning to people around the world`}
|
{` of learning to people around the world`}
|
||||||
{duration === 'one-time' ? `for one ` : `each `}
|
{duration === 'onetime' ? `.` : ` each ${duration}.`}
|
||||||
{duration === 'monthly' ? `month.` : `year.`}
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</Tab>
|
</Tab>
|
||||||
|
@ -7,7 +7,7 @@ const DonateText = () => {
|
|||||||
<Col sm={10} smOffset={1} xs={12}>
|
<Col sm={10} smOffset={1} xs={12}>
|
||||||
<p>freeCodeCamp is a highly efficient education nonprofit.</p>
|
<p>freeCodeCamp is a highly efficient education nonprofit.</p>
|
||||||
<p>
|
<p>
|
||||||
In 2019 alone, we provided 1,100,000,000 minutes of free education to
|
In 2019 alone, we provided 18 million hours of free education to
|
||||||
people around the world.
|
people around the world.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
|
Reference in New Issue
Block a user