import React, { Fragment } from 'react'; import PropTypes from 'prop-types'; import { Button, ProgressBar } from '@freecodecamp/react-bootstrap'; import FullWidthRow from '../components/helpers/FullWidthRow'; import Spacer from '../components/helpers/Spacer'; import './supporters.css'; const propTypes = { activeDonations: PropTypes.number.isRequired, isDonating: PropTypes.bool.isRequired }; const supporterGoal = 10000; const supportersLocale = supporterGoal.toLocaleString(); function Supporters({ isDonating, activeDonations }) { const donationsLocale = activeDonations.toLocaleString(); const isGoalReached = activeDonations >= supporterGoal; return (

Support an open future.

{isGoalReached ? (

🎉 {' '} {donationsLocale} supporters help keep freeCodeCamp.org free to use

) : (
{donationsLocale} supporters out of {supportersLocale} supporter goal
)}

freeCodeCamp.org is a tiny non-profit that's helping millions of people learn to code for free.

{isDonating ? ( Thanks for being a supporter!

Do you know anyone who's interested in technology? Encourage them to join the community.
) : ( `Join ${donationsLocale} supporters. Your $5 / month` + 'donation will help keep tech education free and open.' )}

{isDonating ? null : ( )}
); } Supporters.displayName = 'Supporters'; Supporters.propTypes = propTypes; export default Supporters;