Skip to content

Commit

Permalink
Use servicesContext for mutation path
Browse files Browse the repository at this point in the history
  • Loading branch information
Jondyr committed Dec 9, 2024
1 parent 5bc225c commit 60e3a10
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { useMutation } from '@tanstack/react-query';
import { createPreviewInstance } from '../../api/mutations';
import { useServicesContext } from '../../contexts/ServicesContext';

type CreatePreviewPayload = {
partyId: number;
taskId: string;
};

export const useCreatePreviewInstanceMutation = (org: string, app: string) => {
const { createPreviewInstance } = useServicesContext();
return useMutation({
mutationFn: ({ partyId, taskId }: CreatePreviewPayload) =>
createPreviewInstance(org, app, partyId, taskId),
Expand Down

0 comments on commit 60e3a10

Please sign in to comment.