From 20ff94ca2081a5a7341b9e9d5fab7cbb094fa3dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Tymczuk?= Date: Wed, 13 Nov 2024 15:01:03 +0100 Subject: [PATCH] chore(dashboard): revert trigger success toast (#6987) --- .../test-workflow/test-workflow-tabs.tsx | 30 +++++++++++-------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/apps/dashboard/src/components/workflow-editor/test-workflow/test-workflow-tabs.tsx b/apps/dashboard/src/components/workflow-editor/test-workflow/test-workflow-tabs.tsx index 3c961bef8c3..f0420842404 100644 --- a/apps/dashboard/src/components/workflow-editor/test-workflow/test-workflow-tabs.tsx +++ b/apps/dashboard/src/components/workflow-editor/test-workflow/test-workflow-tabs.tsx @@ -1,5 +1,5 @@ import { useMemo } from 'react'; -import { Link, useNavigate, useParams } from 'react-router-dom'; +import { Link, useParams } from 'react-router-dom'; import { RiPlayCircleLine, RiProgress1Fill } from 'react-icons/ri'; import { useForm } from 'react-hook-form'; // eslint-disable-next-line @@ -15,11 +15,10 @@ import { useTriggerWorkflow } from '@/hooks/use-trigger-workflow'; import { showToast } from '../../primitives/sonner-helpers'; import { buildDynamicFormSchema, makeObjectFromSchema, TestWorkflowFormType } from '../schema'; import { TestWorkflowForm } from './test-workflow-form'; -import { SuccessButtonToast } from '@/components/success-button-toast'; import { toast } from 'sonner'; +import { ToastClose, ToastIcon } from '@/components/primitives/sonner'; export const TestWorkflowTabs = ({ testData }: { testData: WorkflowTestDataResponseDto }) => { - const navigate = useNavigate(); const { environmentSlug = '', workflowSlug = '' } = useParams<{ environmentSlug: string; workflowSlug: string }>(); const { workflow } = useFetchWorkflow({ workflowSlug, @@ -51,16 +50,21 @@ export const TestWorkflowTabs = ({ testData }: { testData: WorkflowTestDataRespo showToast({ variant: 'lg', children: ({ close }) => ( - { - close(); - navigate(buildRoute(LEGACY_ROUTES.ACTIVITY_FEED, { transactionId })); - }} - onClose={close} - /> + <> + +
+ Test workflow triggered successfully + {`Test workflow ${workflowSlug} was triggered successfully`} + + View activity feed + +
+ + ), options: { position: 'bottom-right',