import { useMutation } from "@tanstack/react-query";
import { getMillis } from "taehui-ts/date";

import { wwwAXIOS } from "src/Www";

export default function usePostHit() {
  return useMutation({
    mutationFn: async () => {
      const { data } = await wwwAXIOS.post("/hit", null, {
        headers: {
          millis: getMillis(),
        },
      });
      return data;
    },
  });
}
