diff options
Diffstat (limited to 'packages/bank/src/pages/home/index.tsx')
-rw-r--r-- | packages/bank/src/pages/home/index.tsx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/packages/bank/src/pages/home/index.tsx b/packages/bank/src/pages/home/index.tsx index 1563022..b9d3633 100644 --- a/packages/bank/src/pages/home/index.tsx +++ b/packages/bank/src/pages/home/index.tsx @@ -1472,15 +1472,15 @@ const LoginForm = (Props: any): VNode => { // add an animation class to the body, as a form of mini transition document.body.classList.add('transition-login') setTimeout(() => { - document.body.classList.remove('transition-login') loginCall( // Deep copy, to avoid the cleanup // below make data disappear. { ...submitData }, backendStateSetter, pageStateSetter - ); + ).then(()=>document.body.classList.remove('transition-login')); submitDataSetter(undefined); + setTimeout(() => document.body.classList.remove('transition-login'), 500); // just incase the loginCall never exits }, 500); }}>{i18n`Login`} </button> @@ -1578,11 +1578,13 @@ const RegistrationForm = (Props: any): VNode => { return; } console.log('submitting the registration..'); + document.body.classList.add('transition-login') registrationCall( { ...submitData }, Props.backendStateSetter, // will store BE URL, if OK. pageStateSetter - ); + ).then(() => document.body.classList.remove('transition-login')); + setTimeout(() => document.body.classList.remove('transition-login'), 1500); // incase registrationCall never exits console.log('Clearing the input data'); /** * FIXME: clearing the data should be done by setting |