Skip to content

The open alternative to Salesforce, designed for AI.

Fix workflow diagram success edges (#12439)

martmulle227c0443a00
diff --git a/packages/twenty-front/src/modules/workflow/workflow-diagram/components/WorkflowDiagramSuccessEdge.tsx b/packages/twenty-front/src/modules/workflow/workflow-diagram/components/WorkflowDiagramSuccessEdge.tsx
index 27af8bd0887..d9b56943f4d 100644
--- a/packages/twenty-front/src/modules/workflow/workflow-diagram/components/WorkflowDiagramSuccessEdge.tsx
+++ b/packages/twenty-front/src/modules/workflow/workflow-diagram/components/WorkflowDiagramSuccessEdge.tsx
@@ -8,6 +8,7 @@ import {
getStraightPath,
} from '@xyflow/react';
import { Label } from 'twenty-ui/display';
+import { CREATE_STEP_NODE_WIDTH } from '@/workflow/workflow-diagram/constants/CreateStepNodeWidth';
const StyledLabel = styled(Label)`
color: ${({ theme }) => theme.tag.text.turquoise};
@@ -16,9 +17,7 @@ const StyledLabel = styled(Label)`
type WorkflowDiagramSuccessEdgeProps = EdgeProps;
export const WorkflowDiagramSuccessEdge = ({
- sourceX,
sourceY,
- targetX,
targetY,
markerStart,
markerEnd,
@@ -27,9 +26,9 @@ export const WorkflowDiagramSuccessEdge = ({
const theme = useTheme();
const [edgePath, labelX, labelY] = getStraightPath({
- sourceX,
+ sourceX: CREATE_STEP_NODE_WIDTH,
sourceY,
- targetX,
+ targetX: CREATE_STEP_NODE_WIDTH,
targetY,
});