Merge pull request #1766 from automatisch/AUT-705

refactor: rewrite useStepWithTestExecutions with RQ
This commit is contained in:
Ali BARIN
2024-04-10 13:30:04 +02:00
committed by GitHub
8 changed files with 32 additions and 83 deletions

View File

@@ -0,0 +1,19 @@
import { useQuery } from '@tanstack/react-query';
import api from 'helpers/api';
export default function useStepWithTestExecutions(stepId) {
const query = useQuery({
queryKey: ['stepWithTestExecutions', stepId],
queryFn: async ({ signal }) => {
const { data } = await api.get(`/v1/steps/${stepId}/previous-steps`, {
signal,
});
return data;
},
enabled: false,
});
return query;
}