From 1e4c5fd6f05206b5717a50826f9d05bef9833345 Mon Sep 17 00:00:00 2001 From: Mrugesh Mohapatra Date: Tue, 29 Dec 2020 12:23:58 +0530 Subject: [PATCH] fix: update donate page text options --- .../Donation/DonationTextComponents.js | 40 +++++++++---------- client/src/pages/donate.js | 3 +- 2 files changed, 19 insertions(+), 24 deletions(-) diff --git a/client/src/components/Donation/DonationTextComponents.js b/client/src/components/Donation/DonationTextComponents.js index a58c273f6d..6fcf6dec53 100644 --- a/client/src/components/Donation/DonationTextComponents.js +++ b/client/src/components/Donation/DonationTextComponents.js @@ -1,29 +1,25 @@ import React from 'react'; +import { useTranslation } from 'react-i18next'; -export const DonationSupportText = () => ( - <> -

- Need help with your current or past donations? -

-

- Forward a copy of your donation receipt to donors@freecodecamp.org and - tell us how we can help. -

- -); - -export const DonationText = () => { +export const DonationSupportText = () => { + const { t } = useTranslation(); return ( <> -

freeCodeCamp is a highly efficient education nonprofit.

-

- When you donate to freeCodeCamp, you help people learn new skills and - provide for their families. -

-

- You also help us create new resources for you to use to expand your own - technology skills. -

+

+ {t('donate.need-help')} +

+

{t('donate.forward-receipt')}

+ + ); +}; + +export const DonationText = () => { + const { t } = useTranslation(); + return ( + <> +

{t('donate.efficiency')}

+

{t('donate.why-donate-1')}

+

{t('donate.why-donate-2')}

); }; diff --git a/client/src/pages/donate.js b/client/src/pages/donate.js index dcbc2ef81d..ea541ef08d 100644 --- a/client/src/pages/donate.js +++ b/client/src/pages/donate.js @@ -5,7 +5,7 @@ import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; import { Grid, Row, Col, Alert } from '@freecodecamp/react-bootstrap'; -import { Trans, withTranslation } from 'react-i18next'; +import { withTranslation } from 'react-i18next'; import { Spacer, Loader } from '../components/helpers'; import DonateForm from '../components/Donation/DonateForm'; @@ -76,7 +76,6 @@ export class DonatePage extends Component { render() { const { showLoading, isDonating, t } = this.props; - const url = 'https://www.paypal.me/freecodecamp'; if (showLoading) { return ;