<commit_before>import React, { Component, Fragment } from 'react';
import Helmet from 'react-helmet';
import { Grid, Col, Row } from '@freecodecamp/react-bootstrap';

import ReactGA from '../analytics/index.js';
import { Link, Spacer } from '../components/helpers';

const paypalMonthlyDonations = [
  {
    eventLabel: 'paypal',
    eventValue: 5,
    defaultValueHash: 'KTAXU8B4MYAT8',
    defaultValue: 'Donate $5 each month'
  },
  {
    eventLabel: 'paypal',
    eventValue: 10,
    defaultValueHash: 'BYEBQEHS5LHNC',
    defaultValue: 'Donate $10 each month'
  },
  {
    eventLabel: 'paypal',
    eventValue: 35,
    defaultValueHash: '57ZPMKJ8G893Y',
    defaultValue: 'Donate $35 each month'
  },
  {
    eventLabel: 'paypal',
    eventValue: 50,
    defaultValueHash: '2ZVYTHK6Q7AFW',
    defaultValue: 'Donate $50 each month'
  },
  {
    eventLabel: 'paypal',
    eventValue: 100,
    defaultValueHash: 'C7PUT3LMJHKK2',
    defaultValue: 'Donate $100 each month'
  },
  {
    eventLabel: 'paypal',
    eventValue: 250,
    defaultValueHash: '69JGTY4DHSTEN',
    defaultValue: 'Donate $250 each month'
  }
];

const paypalOneTimeDonation = {
  eventLabel: 'paypal one time donation',
  eventValue: 0,
  defaultValueHash: 'B256JC6ZCWD3J',
  defaultValue: 'Make a one-time donation'
};

class DonateOtherPage extends Component {
  renderForm(item) {
    return (
      <form
        action='https://www.paypal.com/cgi-bin/webscr'
        method='post'
        onSubmit={() =>
          ReactGA.event({
            category: 'donation',
            action: 'click',
            label: item.eventLabel,
            value: item.eventValue
          })
        }
        target='_blank'
      >
        <input defaultValue='_s-xclick' name='cmd' type='hidden' />{' '}
        <input
          defaultValue={item.defaultValueHash}
          name='hosted_button_id'
          type='hidden'
        />{' '}
        <input
          className='btn btn-cta signup-btn btn-block'
          defaultValue={item.defaultValue}
          name='submit'
          type='submit'
        />
      </form>
    );
  }

  /* eslint-disable max-len */
  render() {
    return (
      <Fragment>
        <Helmet title='Other ways to donate | freeCodeCamp.org' />
        <Spacer />
        <Grid>
          <Row>
            <Col md={6} mdOffset={3} sm={10} smOffset={1} xs={12}>
              <h2 className='text-center'>
                Other ways you can support our nonprofit
              </h2>
              <p>
                freeCodeCamp is a small donor-supported 501(c)(3) public
                charity. We are tax-exempt, so you can deduct donations you make
                to our nonprofit from your taxes. You can{' '}
                <a href='https://s3.amazonaws.com/freecodecamp/Free+Code+Camp+Inc+IRS+Determination+Letter.pdf'>
                  download our IRS Determination Letter here<commit_msg>fix(client): Donate other display correct submit button text<commit_after>import React, { Component, Fragment } from 'react';
import Helmet from 'react-helmet';
import { Grid, Col, Row } from '@freecodecamp/react-bootstrap';

import ReactGA from '../analytics/index.js';
import { Link, Spacer } from '../components/helpers';

const paypalMonthlyDonations = [
  {
    eventLabel: 'paypal',
    eventValue: 5,
    defaultValueHash: 'KTAXU8B4MYAT8',
    defaultValue: 'Donate $5 each month'
  },
  {
    eventLabel: 'paypal',
    eventValue: 10,
    defaultValueHash: 'BYEBQEHS5LHNC',
    defaultValue: 'Donate $10 each month'
  },
  {
    eventLabel: 'paypal',
    eventValue: 35,
    defaultValueHash: '57ZPMKJ8G893Y',
    defaultValue: 'Donate $35 each month'
  },
  {
    eventLabel: 'paypal',
    eventValue: 50,
    defaultValueHash: '2ZVYTHK6Q7AFW',
    defaultValue: 'Donate $50 each month'
  },
  {
    eventLabel: 'paypal',
    eventValue: 100,
    defaultValueHash: 'C7PUT3LMJHKK2',
    defaultValue: 'Donate $100 each month'
  },
  {
    eventLabel: 'paypal',
    eventValue: 250,
    defaultValueHash: '69JGTY4DHSTEN',
    defaultValue: 'Donate $250 each month'
  }
];

const paypalOneTimeDonation = {
  eventLabel: 'paypal one time donation',
  eventValue: 0,
  defaultValueHash: 'B256JC6ZCWD3J',
  defaultValue: 'Make a one-time donation'
};

class DonateOtherPage extends Component {
  renderForm(item) {
    return (
      <form
        action='https://www.paypal.com/cgi-bin/webscr'
        method='post'
        onSubmit={() =>
          ReactGA.event({
            category: 'donation',
            action: 'click',
            label: item.eventLabel,
            value: item.eventValue
          })
        }
        target='_blank'
      >
        <input name='cmd' type='hidden' value='_s-xclick' />{' '}
        <input
          name='hosted_button_id'
          type='hidden'
          value={item.defaultValueHash}
        />{' '}
        <input
          className='btn btn-cta signup-btn btn-block'
          name='submit'
          type='submit'
          value={item.defaultValue}
        />
      </form>
    );
  }

  /* eslint-disable max-len */
  render() {
    return (
      <Fragment>
        <Helmet title='Other ways to donate | freeCodeCamp.org' />
        <Spacer />
        <Grid>
          <Row>
            <Col md={6} mdOffset={3} sm={10} smOffset={1} xs={12}>
              <h2 className='text-center'>
                Other ways you can support our nonprofit
              </h2>
              <p>
                freeCodeCamp is a small donor-supported 501(c)(3) public
                charity. We are tax-exempt, so you can deduct donations you make
                to our nonprofit from your taxes. You can{' '}
                <a href='https://s3.amazonaws.com/freecodecamp/Free+Code+Camp+Inc+IRS+Determination+Letter.pdf'>
                  download our IRS Determination Letter here
{'fraction_non_alphanumeric': 0.12388622344071282, 'fraction_numerical': 0.02227553118574366, 'mean_word_length': 2.2645413870246087, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 35, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6118987', 'n_tokens_mistral': 1949, 'n_tokens_neox': 1838, 'n_words': 428}