Skip to content

Commit

Permalink
chore(dashboard): revert trigger toast
Browse files Browse the repository at this point in the history
  • Loading branch information
LetItRock committed Nov 13, 2024
1 parent bc9a0d3 commit 28e8034
Showing 1 changed file with 16 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { buildDynamicFormSchema, makeObjectFromSchema, TestWorkflowFormType } fr
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();
Expand Down Expand Up @@ -51,16 +52,21 @@ export const TestWorkflowTabs = ({ testData }: { testData: WorkflowTestDataRespo
showToast({
variant: 'lg',
children: ({ close }) => (
<SuccessButtonToast
title="Test workflow triggered successfully"
description={`Test workflow ${workflowSlug} was triggered successfully`}
actionLabel="View activity feed"
onAction={() => {
close();
navigate(buildRoute(LEGACY_ROUTES.ACTIVITY_FEED, { transactionId }));
}}
onClose={close}
/>
<>
<ToastIcon variant="default" />
<div className="flex flex-col gap-2">
<span className="font-medium">Test workflow triggered successfully</span>
<span className="text-foreground-600">{`Test workflow ${workflowSlug} was triggered successfully`}</span>
<Link
to={`${LEGACY_ROUTES.ACTIVITY_FEED}?transactionId=${transactionId}`}
reloadDocument
className="text-foreground-950 flex items-center gap-1 text-sm font-medium"
>
View activity feed
</Link>
</div>
<ToastClose onClick={close} />
</>
),
options: {
position: 'bottom-right',
Expand Down

0 comments on commit 28e8034

Please sign in to comment.