Skip to content

Commit

Permalink
Fix lint issues in use-handle-runtime-active.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
openhands-agent committed Jan 8, 2025
1 parent bfa7268 commit 7189146
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions frontend/src/routes/_oh.app/hooks/use-handle-runtime-active.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ import { RootState } from "#/store";
import { base64ToBlob } from "#/utils/base64-to-blob";
import { useUploadFiles } from "../../../hooks/mutation/use-upload-files";
import { useGitHubUser } from "../../../hooks/query/use-github-user";
import { isGitHubErrorReponse } from "#/api/github-axios-instance";

import { RUNTIME_INACTIVE_STATES } from "#/types/agent-state";

export const useHandleRuntimeActive = () => {
const { gitHubToken } = useAuth();
const { send } = useWsClient();
useAuth();
useWsClient();

const dispatch = useDispatch();

const { data: user } = useGitHubUser();
useGitHubUser();
const { mutate: uploadFiles } = useUploadFiles();
const { curAgentState } = useSelector((state: RootState) => state.agent);

Expand All @@ -27,11 +27,6 @@ export const useHandleRuntimeActive = () => {
(state: RootState) => state.initialQuery,
);

const userId = React.useMemo(() => {
if (user && !isGitHubErrorReponse(user)) return user.id;
return null;
}, [user]);

const handleUploadFiles = (zip: string) => {
const blob = base64ToBlob(zip);
const file = new File([blob], "imported-project.zip", {
Expand Down

0 comments on commit 7189146

Please sign in to comment.