From 62aa54efbaa8e4100689e6ddd42e69bbecf99eca Mon Sep 17 00:00:00 2001 From: mrugesh <1884376+raisedadead@users.noreply.github.com> Date: Tue, 19 Nov 2019 23:56:30 +0530 Subject: [PATCH] fix(donate): apply suggestions from code review Co-Authored-By: Oliver Eyton-Williams --- .../src/components/Donation/components/DonateForm.js | 4 ++-- .../Donation/components/DonateServicebotEmbed.js | 2 +- client/src/pages/donation/settings.js | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/client/src/components/Donation/components/DonateForm.js b/client/src/components/Donation/components/DonateForm.js index c3f8fd0281..015068ec68 100644 --- a/client/src/components/Donation/components/DonateForm.js +++ b/client/src/components/Donation/components/DonateForm.js @@ -73,9 +73,9 @@ class DonateForm extends Component { this.amounts = amountsConfig; this.state = { + ...defaultStateConfig, processing: false, - isDonating: this.props.isDonating, - ...defaultStateConfig + isDonating: this.props.isDonating }; this.getActiveDonationAmount = this.getActiveDonationAmount.bind(this); diff --git a/client/src/components/Donation/components/DonateServicebotEmbed.js b/client/src/components/Donation/components/DonateServicebotEmbed.js index 6079bed49e..d3fd85a16b 100644 --- a/client/src/components/Donation/components/DonateServicebotEmbed.js +++ b/client/src/components/Donation/components/DonateServicebotEmbed.js @@ -37,7 +37,7 @@ export class DonationServicebotEmbed extends Component { disableCoupon: true, forceCard: true, disableTiers: [ - 'Monthly $10 Donation - Unavailable', + 'Monthly $10 Donation - Unavailable', 'Monthly $3 Donation - Unavailable' ], card: { diff --git a/client/src/pages/donation/settings.js b/client/src/pages/donation/settings.js index 8325eab05a..090cf3cdac 100644 --- a/client/src/pages/donation/settings.js +++ b/client/src/pages/donation/settings.js @@ -85,7 +85,7 @@ export class DonationSettingsPage extends Component { renderServicebotEmbed() { const { currentSettingsEmail, hash } = this.state; - if (!hash && !currentSettingsEmail) { + if (!hash || !currentSettingsEmail) { return null; } return ( @@ -100,8 +100,8 @@ export class DonationSettingsPage extends Component { const { donationEmails } = this.props; return (
- {uniq(donationEmails).map((email, index) => ( -
+ {uniq(donationEmails).map(email => ( +