AykutSarac %!s(int64=2) %!d(string=hai) anos
pai
achega
b38d5df6de
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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 });
       }
     }
   },