feat: use REST API endpoint to delete step

This commit is contained in:
Ali BARIN
2024-09-18 15:49:18 +00:00
committed by Faruk AYDIN
parent 8ef2000e45
commit f94a5385d7
2 changed files with 20 additions and 5 deletions

View File

@@ -0,0 +1,14 @@
import { useMutation } from '@tanstack/react-query';
import api from 'helpers/api';
export default function useDeleteStep() {
const query = useMutation({
mutationFn: async (stepId) => {
const { data } = await api.delete(`/v1/steps/${stepId}`);
return data;
},
});
return query;
}