AykutSarac 2 years ago
parent
commit
b38d5df6de
1 changed files with 1 additions and 1 deletions
  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 });
       }
     }
   },