fix(donate): remove isSigned in check temporarily

This commit is contained in:
Mrugesh Mohapatra
2020-03-19 19:35:55 +05:30
committed by mrugesh
parent 585527d145
commit 170e3dbf4f
2 changed files with 1 additions and 26 deletions

View File

@ -108,12 +108,6 @@ export default function donateBoot(app, done) {
function createStripeDonation(req, res) { function createStripeDonation(req, res) {
const { user, body } = req; const { user, body } = req;
if (!user || !body) {
return res
.status(500)
.send({ error: 'User must be signed in for this request.' });
}
const { const {
amount, amount,
duration, duration,

View File

@ -3,7 +3,6 @@ import PropTypes from 'prop-types';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { createSelector } from 'reselect'; import { createSelector } from 'reselect';
import { import {
Button,
Tabs, Tabs,
Tab, Tab,
Row, Row,
@ -19,7 +18,6 @@ import {
defaultAmount, defaultAmount,
defaultStateConfig defaultStateConfig
} from '../../../../config/donation-settings'; } from '../../../../config/donation-settings';
import { apiLocation } from '../../../../config/env.json';
import Spacer from '../helpers/Spacer'; import Spacer from '../helpers/Spacer';
import DonateFormChildViewForHOC from './DonateFormChildViewForHOC'; import DonateFormChildViewForHOC from './DonateFormChildViewForHOC';
import { import {
@ -57,11 +55,6 @@ const mapDispatchToProps = {
navigate navigate
}; };
const createOnClick = navigate => e => {
e.preventDefault();
return navigate(`${apiLocation}/signin?returnTo=donate`);
};
class DonateForm extends Component { class DonateForm extends Component {
constructor(...args) { constructor(...args) {
super(...args); super(...args);
@ -207,25 +200,13 @@ class DonateForm extends Component {
} }
render() { render() {
const { isSignedIn, navigate, showLoading } = this.props;
return ( return (
<Row> <Row>
<Col sm={10} smOffset={1} xs={12}> <Col sm={10} smOffset={1} xs={12}>
{this.renderDurationAmountOptions()} {this.renderDurationAmountOptions()}
</Col> </Col>
<Col sm={10} smOffset={1} xs={12}> <Col sm={10} smOffset={1} xs={12}>
{!showLoading && !isSignedIn ? ( {this.renderDonationOptions()}
<Button
bsStyle='default'
className='btn btn-block'
onClick={createOnClick(navigate)}
>
Become a supporter
</Button>
) : (
this.renderDonationOptions()
)}
</Col> </Col>
</Row> </Row>
); );