AykutSarac 2 лет назад
Родитель
Сommit
b38d5df6de
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/store/useUser.tsx

+ 1 - 1
src/store/useUser.tsx

@@ -45,7 +45,7 @@ const useUser = create<UserStates & UserActions>()((set, get) => ({
       if ((data.user as any)?.type > 0) {
         location.replace(location.href.replace("://", "://pro."));
       } else {
-        location.pathname = "/editor";
+        set({ user: data.user as any, isAuthenticated: true });
       }
     }
   },