Browse Source

110234 add then to installer

soumaeda 2 years ago
parent
commit
e1c9a27e2d

+ 1 - 1
apps/app/src/components/InstallerForm.tsx

@@ -65,7 +65,7 @@ const InstallerForm = memo((): JSX.Element => {
 
     try {
       await apiv3Post('/installer', data);
-      router.push('/');
+      router.push('/').then(() => setIsLoading(false));
     }
     catch (errs) {
       const err = errs[0];

+ 1 - 1
apps/app/src/components/InvitedForm.tsx

@@ -44,7 +44,7 @@ export const InvitedForm = (props: InvitedFormProps): JSX.Element => {
     try {
       const res = await apiv3Post('/invited', { invitedForm });
       const { redirectTo } = res.data;
-      router.push(redirectTo ?? '/');
+      router.push(redirectTo ?? '/').then(() => setIsLoading(false));
     }
     catch (err) {
       setLoginErrors(err);