fix: make donation plan dynamic
This commit is contained in:
committed by
Kristofer Koishigawa
parent
58bd0b5ce4
commit
af46e851df
@ -118,6 +118,8 @@ class MinimalDonateForm extends Component {
|
|||||||
const {
|
const {
|
||||||
donationState: { processing, success, error }
|
donationState: { processing, success, error }
|
||||||
} = this.state;
|
} = this.state;
|
||||||
|
|
||||||
|
const donationPlan = `$${donationAmount / 100} / ${donationDuration}`;
|
||||||
if (processing || success || error) {
|
if (processing || success || error) {
|
||||||
return this.renderCompletion({
|
return this.renderCompletion({
|
||||||
processing,
|
processing,
|
||||||
@ -131,7 +133,7 @@ class MinimalDonateForm extends Component {
|
|||||||
<Row>
|
<Row>
|
||||||
<Col lg={8} lgOffset={2} sm={10} smOffset={1} xs={12}>
|
<Col lg={8} lgOffset={2} sm={10} smOffset={1} xs={12}>
|
||||||
<Spacer />
|
<Spacer />
|
||||||
<b>Confirm your donation of $5 / year with PayPal:</b>
|
<b>Confirm your donation of {donationPlan} with PayPal:</b>
|
||||||
<Spacer />
|
<Spacer />
|
||||||
<PaypalButton
|
<PaypalButton
|
||||||
donationAmount={donationAmount}
|
donationAmount={donationAmount}
|
||||||
@ -151,7 +153,7 @@ class MinimalDonateForm extends Component {
|
|||||||
donationAmount={donationAmount}
|
donationAmount={donationAmount}
|
||||||
donationDuration={donationDuration}
|
donationDuration={donationDuration}
|
||||||
getDonationButtonLabel={() =>
|
getDonationButtonLabel={() =>
|
||||||
`Confirm your donation of $5 / year`
|
`Confirm your donation of ${donationPlan}`
|
||||||
}
|
}
|
||||||
handleProcessing={handleProcessing}
|
handleProcessing={handleProcessing}
|
||||||
/>
|
/>
|
||||||
|
Reference in New Issue
Block a user