'() => Promise<AxiosResponse<any, any>>' 유형에 'UseMutationOptions<unknown, Error, void, unknown>' 유형과 공통적인 속성이 없습니다.ts(2559)
const fetch = async () => {
const axiosInstance = await AxiosToken();
return axiosInstance.post(`/api/tayo/10/enroll/${similarList?.id}`);
};
const joinToGati = () => {
const deleteAccountHandler = useMutation(() => fetch);
};
useMutation에서 지정한 유형이 전달하는 함수와 일치하는지 명확하게 적어줘야한다
const fetch = () => {
const axiosInstance = await AxiosToken();
return axiosInstance.post(`/api/tayo/10/enroll/${similarList?.id}`);
};
const joinToGati = async () => {
return useMutation({
mutationFn: fetch,
});
};