From a10edff3fa5d25ae1d979379c3dc3a4c3943369e Mon Sep 17 00:00:00 2001 From: Tom Caiger Date: Fri, 19 Jul 2024 16:48:01 +1200 Subject: [PATCH] Update useCreateTask.ts --- packages/datatrak-web/src/api/mutations/useCreateTask.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/datatrak-web/src/api/mutations/useCreateTask.ts b/packages/datatrak-web/src/api/mutations/useCreateTask.ts index afec36ae14..be4d3de8f3 100644 --- a/packages/datatrak-web/src/api/mutations/useCreateTask.ts +++ b/packages/datatrak-web/src/api/mutations/useCreateTask.ts @@ -6,6 +6,7 @@ import { useMutation, useQueryClient } from 'react-query'; import { DatatrakWebTaskChangeRequest } from '@tupaia/types'; import { post } from '../api'; +import { successToast } from '../../utils'; export const useCreateTask = (onSuccess?: () => void) => { const queryClient = useQueryClient(); @@ -18,6 +19,7 @@ export const useCreateTask = (onSuccess?: () => void) => { { onSuccess: () => { queryClient.invalidateQueries('tasks'); + successToast('Task successfully created'); if (onSuccess) onSuccess(); }, },