soumaeda 2 лет назад
Родитель
Сommit
e1c9a27e2d
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      apps/app/src/components/InstallerForm.tsx
  2. 1 1
      apps/app/src/components/InvitedForm.tsx

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

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

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

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