fix(donate): adjust verbiage and time contibuted

This commit is contained in:
Mrugesh Mohapatra
2019-11-19 14:39:56 +05:30
parent f737b24b6f
commit 21b09b53cb
2 changed files with 10 additions and 7 deletions

View File

@ -96,8 +96,12 @@ class DonateForm extends Component {
: this.amounts[durationSelected][0];
}
convertToTimeContributed(amount) {
return `${numToCommas((amount / 100) * 50 * 60)} minutes`;
convertToTimeContributed(amount, duration) {
const timeContributed =
duration === 'month'
? Math.round(((amount / 100) * 50) / 12)
: (amount / 100) * 50;
return `${numToCommas(timeContributed)} hours`;
}
getFormatedAmountLabel(amount) {
@ -183,10 +187,9 @@ class DonateForm extends Component {
{`Your `}
{this.getFormatedAmountLabel(donationAmount)}
{` donation will provide `}
{this.convertToTimeContributed(donationAmount)}
{` of learning to people around the world `}
{duration === 'one-time' ? `for one ` : `each `}
{duration === 'monthly' ? `month.` : `year.`}
{this.convertToTimeContributed(donationAmount, duration)}
{` of learning to people around the world`}
{duration === 'onetime' ? `.` : ` each ${duration}.`}
</p>
</div>
</Tab>

View File

@ -7,7 +7,7 @@ const DonateText = () => {
<Col sm={10} smOffset={1} xs={12}>
<p>freeCodeCamp is a highly efficient education nonprofit.</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.
</p>
<p>