chore: address review comments

Co-Authored-By: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
Ahmad Abdolsaheb
2019-12-11 13:05:40 +01:00
committed by mrugesh
parent 053dbfbba4
commit 00f18dc21c
4 changed files with 30 additions and 56 deletions

View File

@@ -50,8 +50,8 @@ const propTypes = {
};
function DonateModal({ show, block, isBlockDonation, closeDonationModal }) {
const [showCloseLabel, setCloseLabel] = React.useState(false);
const changeCloseBtnLabel = () => {
const [closeLabel, setCloseLabel] = React.useState(false);
const showCloseBtn = () => {
setCloseLabel(true);
};
@@ -97,7 +97,7 @@ function DonateModal({ show, block, isBlockDonation, closeDonationModal }) {
<Modal.Body>
{isBlockDonation ? blockDonationText : progressDonationText}
<Spacer />
<MinimalDonateForm changeCloseBtnLabel={changeCloseBtnLabel} />
<MinimalDonateForm showCloseBtn={showCloseBtn} />
<Spacer />
<Row>
<Col sm={10} smOffset={1} xs={12}>
@@ -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.'}
</Button>
</Col>
</Row>