Newer
Older
taehui / qwilight-fe / src / app / [language] / note / query / usePostToil.ts
@Taehui Taehui on 17 Mar 384 bytes 2024-03-17 오후 2:12
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,
      });
    },
  });
}