Skip to content

Commit

Permalink
revert tracking ypload file
Browse files Browse the repository at this point in the history
  • Loading branch information
xingyaoww committed Nov 26, 2024
1 parent 35582d7 commit 3605d16
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions frontend/src/hooks/mutation/use-upload-files.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { useMutation } from "@tanstack/react-query";
import posthog from "posthog-js";
import OpenHands from "#/api/open-hands";
import { useAuth } from "#/context/auth-context";

Expand All @@ -11,14 +10,7 @@ export const useUploadFiles = () => {
const { token } = useAuth();

return useMutation({
mutationFn: ({ files }: UploadFilesArgs) => {
files.forEach((file) => {
posthog.capture("zip_file_uploaded", {
file_name: file.name,
file_size: file.size,
});
});
return OpenHands.uploadFiles(token || "", files);
},
mutationFn: ({ files }: UploadFilesArgs) =>
OpenHands.uploadFiles(token || "", files),
});
};

0 comments on commit 3605d16

Please sign in to comment.