Skip to content

Commit

Permalink
Fix Git cache
Browse files Browse the repository at this point in the history
  • Loading branch information
amanape committed Nov 25, 2024
1 parent b5e4216 commit 7c42205
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions frontend/src/hooks/mutation/use-submit-feedback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,16 @@ import { useMutation } from "@tanstack/react-query";
import toast from "react-hot-toast";
import { Feedback } from "#/api/open-hands.types";
import OpenHands from "#/api/open-hands";
import { useAuth } from "#/context/auth-context";

type SubmitFeedbackArgs = {
feedback: Feedback;
};

export const useSubmitFeedback = () => {
const { token } = useAuth();

return useMutation({
export const useSubmitFeedback = () =>
useMutation({
mutationFn: ({ feedback }: SubmitFeedbackArgs) =>
OpenHands.submitFeedback(token || "", feedback),
OpenHands.submitFeedback(feedback),
onError: (error) => {
toast.error(error.message);
},
});
};

0 comments on commit 7c42205

Please sign in to comment.