From 36aec9736b3c5ea3e080b79291196203f419697e Mon Sep 17 00:00:00 2001 From: Jonas Dyrlie Date: Mon, 9 Dec 2024 10:09:45 +0100 Subject: [PATCH] Use servicesContext for mutation path --- .../src/hooks/mutations/useCreatePreviewInstanceMutation.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/packages/shared/src/hooks/mutations/useCreatePreviewInstanceMutation.ts b/frontend/packages/shared/src/hooks/mutations/useCreatePreviewInstanceMutation.ts index ba3288cb2f1..82d77f0d068 100644 --- a/frontend/packages/shared/src/hooks/mutations/useCreatePreviewInstanceMutation.ts +++ b/frontend/packages/shared/src/hooks/mutations/useCreatePreviewInstanceMutation.ts @@ -1,5 +1,5 @@ import { useMutation } from '@tanstack/react-query'; -import { createPreviewInstance } from '../../api/mutations'; +import { useServicesContext } from '../../contexts/ServicesContext'; type CreatePreviewPayload = { partyId: number; @@ -7,6 +7,7 @@ type CreatePreviewPayload = { }; export const useCreatePreviewInstanceMutation = (org: string, app: string) => { + const { createPreviewInstance } = useServicesContext(); return useMutation({ mutationFn: ({ partyId, taskId }: CreatePreviewPayload) => createPreviewInstance(org, app, partyId, taskId),