feat: use REST API endpoint to delete step

This commit is contained in:
Ali BARIN
2024-09-19 13:07:37 +03:00
committed by Faruk AYDIN
parent 8ef2000e45
commit f94a5385d7
2 changed files with 20 additions and 5 deletions
+14
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;
}