fix(donate): re-order and scroll to top on processing

This commit is contained in:
Mrugesh Mohapatra
2019-11-19 19:18:17 +05:30
parent aeec1bb9e6
commit 1da1f7d0be

View File

@@ -85,7 +85,6 @@ class DonateFormChildViewForHOC extends Component {
handleSubmit(e) { handleSubmit(e) {
e.preventDefault(); e.preventDefault();
this.hideAmountOptions(true);
const email = this.getUserEmail(); const email = this.getUserEmail();
if (!email || !isEmail(email)) { if (!email || !isEmail(email)) {
return this.setState(state => ({ return this.setState(state => ({
@@ -130,6 +129,10 @@ class DonateFormChildViewForHOC extends Component {
} }
})); }));
// hide the donation options on the parent and scroll to top
this.hideAmountOptions(true);
window.scrollTo(0, 0);
return postChargeStripe({ return postChargeStripe({
token, token,
amount, amount,