import { wwwAPI } from "@/utilities/wwwAPI";
import { useMutation } from "@tanstack/react-query";

export default function usePostToil() {
  return useMutation({
    mutationFn: async ({
      noteID,
      commentary,
    }: {
      noteID: string;
      commentary: string;
    }) => {
      await wwwAPI.post("/toil", {
        noteID,
        commentary,
      });
    },
  });
}
