{isBlockDonation ? blockDonationText : progressDonationText}
-
+
@@ -108,7 +108,7 @@ function DonateModal({ show, block, isBlockDonation, closeDonationModal }) {
className='btn-link'
onClick={closeDonationModal}
>
- {showCloseLabel ? 'close' : 'Please ask me later.'}
+ {closeLabel ? 'Close.' : 'Please ask me later.'}
diff --git a/client/src/components/Donation/components/MinimalDonateForm.js b/client/src/components/Donation/components/MinimalDonateForm.js
index 9ca0d71030..56d9368de2 100644
--- a/client/src/components/Donation/components/MinimalDonateForm.js
+++ b/client/src/components/Donation/components/MinimalDonateForm.js
@@ -1,8 +1,10 @@
+/* eslint-disable react/sort-prop-types */
+/* eslint-disable react/jsx-sort-props */
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
-import { Button, Row, Col } from '@freecodecamp/react-bootstrap';
+import { Row, Col } from '@freecodecamp/react-bootstrap';
import { StripeProvider, Elements } from 'react-stripe-elements';
import {
@@ -10,14 +12,8 @@ import {
durationsConfig,
defaultStateConfig
} from '../../../../../config/donation-settings';
-import { apiLocation } from '../../../../config/env.json';
import DonateFormChildViewForHOC from './DonateFormChildViewForHOC';
-import {
- userSelector,
- isSignedInSelector,
- signInLoadingSelector,
- hardGoTo as navigate
-} from '../../../redux';
+import { userSelector } from '../../../redux';
import '../Donation.css';
import DonateCompletion from './DonateCompletion.js';
@@ -28,12 +24,9 @@ const numToCommas = num =>
num.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1,');
const propTypes = {
- changeCloseBtnLabel: PropTypes.func,
+ showCloseBtn: PropTypes.func,
defaultTheme: PropTypes.string,
isDonating: PropTypes.bool,
- isSignedIn: PropTypes.bool,
- navigate: PropTypes.func.isRequired,
- showLoading: PropTypes.bool.isRequired,
stripe: PropTypes.shape({
createToken: PropTypes.func.isRequired
})
@@ -41,24 +34,11 @@ const propTypes = {
const mapStateToProps = createSelector(
userSelector,
- signInLoadingSelector,
- isSignedInSelector,
- ({ isDonating }, showLoading, isSignedIn) => ({
- isDonating,
- isSignedIn,
- showLoading
+ ({ isDonating }) => ({
+ isDonating
})
);
-const mapDispatchToProps = {
- navigate
-};
-
-const createOnClick = navigate => e => {
- e.preventDefault();
- return navigate(`${apiLocation}/signin?returnTo=donate`);
-};
-
class ModalDonateForm extends Component {
constructor(...args) {
super(...args);
@@ -138,14 +118,14 @@ class ModalDonateForm extends Component {
stripe
} = this.state;
- const { changeCloseBtnLabel, defaultTheme } = this.props;
+ const { showCloseBtn, defaultTheme } = this.props;
return (
{paymentType === 'Card' ? (
- {!showLoading && !isSignedIn ? (
-
- ) : (
- this.renderDonationOptions()
- )}
+ {this.renderDonationOptions()}
);
@@ -201,5 +171,5 @@ ModalDonateForm.propTypes = propTypes;
export default connect(
mapStateToProps,
- mapDispatchToProps
+ null
)(ModalDonateForm);