AykutSarac 2 년 전
부모
커밋
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 });
       }
     }
   },