fix(donate): use intialState as recommended
This commit is contained in:
committed by
Stuart Taylor
parent
6c41dd2b7c
commit
a30637d934
@ -25,7 +25,7 @@ const propTypes = {
|
||||
createToken: PropTypes.func.isRequired
|
||||
})
|
||||
};
|
||||
const initialSate = {
|
||||
const initialState = {
|
||||
donationAmount: 500,
|
||||
donationState: {
|
||||
processing: false,
|
||||
@ -45,7 +45,7 @@ class DonateForm extends Component {
|
||||
super(...args);
|
||||
|
||||
this.state = {
|
||||
...initialSate,
|
||||
...initialState,
|
||||
email: null,
|
||||
isFormValid: false
|
||||
};
|
||||
@ -156,7 +156,7 @@ class DonateForm extends Component {
|
||||
}
|
||||
|
||||
resetDonation() {
|
||||
return this.setState(() => initialSate);
|
||||
return this.setState({...initialState});
|
||||
}
|
||||
|
||||
renderCompletion(props) {
|
||||
|
@ -68,7 +68,6 @@ class DonateModal extends Component {
|
||||
renderMaybe() {
|
||||
const { closeDonationModal } = this.props;
|
||||
const handleClick = e => {
|
||||
console.log(e.target);
|
||||
e.preventDefault();
|
||||
return closeDonationModal();
|
||||
};
|
||||
|
Reference in New Issue
Block a user