feat(donate): two col layout checkout page

This commit is contained in:
Mrugesh Mohapatra
2019-11-05 19:23:36 +05:30
committed by mrugesh
parent 7a4e84d163
commit 4cd5542489
8 changed files with 353 additions and 547 deletions

View File

@@ -1,41 +1,30 @@
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import { Row, Col } from '@freecodecamp/react-bootstrap';
import { activeDonationsSelector } from '../../../redux';
const propTypes = {
activeDonations: PropTypes.number
};
const mapStateToProps = createSelector(
activeDonationsSelector,
activeDonations => ({ activeDonations })
);
const DonateText = ({ activeDonations }) => {
const donationsLocale = activeDonations.toLocaleString();
const DonateText = () => {
return (
<Row>
<Col sm={10} smOffset={1} xs={12}>
<p>
freeCodeCamp.org is a tiny nonprofit that's helping millions of people
learn to code for free.
</p>
<p>
Join <strong>{donationsLocale}</strong> supporters.
</p>
<p>
Your $5 / month donation will help keep tech education free and open.
</p>
</Col>
</Row>
<>
<p>freeCodeCamp is a highly efficient education nonprofit.</p>
<p>
In 2019 alone, we provided 1,100,000,000 minutes of free education to
people around the world.
</p>
<p>
Since freeCodeCamp's total budget is only $373,000, that means every
dollar you donate to freeCodeCamp translates into 50 hours worth of
technology education.
</p>
<p>
When you donate to freeCodeCamp, you help people learn new skills and
provide for their families.
</p>
<p>
You also help us create new resources for you to use to expand your own
technology skills.
</p>
</>
);
};
DonateText.displayName = 'DonateText';
DonateText.propTypes = propTypes;
export default connect(mapStateToProps)(DonateText);
export default DonateText;