Newer
Older
taehui / qwilight-fe / src / note / usePostToil.ts
@Taehui Taehui on 16 Mar 375 bytes 2024-03-17 오전 2:07
import { wwwAXIOS } from "@/Www";
import { useMutation } from "@tanstack/react-query";

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