feat(client): Unify donation loading state (#43179)

* initial loading state unification

* feat(client): show buttons after 3 seconds

* fix: use window.setInterval explicitly

Otherwise TS assumes that it's node's setInterval

* feat(client): remove spinner when first button load

* feat(client): move the loader to the donate page button area

* feat(client): extract grid from modal donation form

* feat(client): remove duplicate donation forms

* feat(client):extract unused components from donationForm

* feat(client): load paypal on load not onInit (for perf)

* feat(client): set paypal loading state if stripe already loaded

* feat(clinet):make lpaypal oading condition strickt.

* Apply suggestions from code review

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>

* feat: clean up

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
Ahmad Abdolsaheb
2021-08-19 22:47:25 +03:00
committed by GitHub
parent 72529a8050
commit 1fec73cdf7
12 changed files with 241 additions and 185 deletions

View File

@@ -33,7 +33,11 @@ export const defaultDonationFormState = {
redirecting: false,
processing: false,
success: false,
error: ''
error: '',
loading: {
stripe: true,
paypal: true
}
};
const initialState = {