@@ -53,22 +53,22 @@ export function IntegrationDetails({ organizationId }: IntegrationDetailsProps)
5353 const workflowGroups = useMemo ( ( ) => {
5454 if ( ! integration ?. status ?. usedIn ) return [ ] ;
5555
56- const groups = new Map < string , { workflowName : string ; nodes : Array < { nodeId : string ; nodeName : string } > } > ( ) ;
56+ const groups = new Map < string , { canvasName : string ; nodes : Array < { nodeId : string ; nodeName : string } > } > ( ) ;
5757 integration . status . usedIn . forEach ( ( nodeRef ) => {
58- const workflowId = nodeRef . workflowId || "" ;
59- const workflowName = nodeRef . workflowName || workflowId ;
58+ const canvasId = nodeRef . canvasId || "" ;
59+ const canvasName = nodeRef . canvasName || canvasId ;
6060 const nodeId = nodeRef . nodeId || "" ;
6161 const nodeName = nodeRef . nodeName || nodeId ;
6262
63- if ( ! groups . has ( workflowId ) ) {
64- groups . set ( workflowId , { workflowName , nodes : [ ] } ) ;
63+ if ( ! groups . has ( canvasId ) ) {
64+ groups . set ( canvasId , { canvasName , nodes : [ ] } ) ;
6565 }
66- groups . get ( workflowId ) ?. nodes . push ( { nodeId, nodeName } ) ;
66+ groups . get ( canvasId ) ?. nodes . push ( { nodeId, nodeName } ) ;
6767 } ) ;
6868
69- return Array . from ( groups . entries ( ) ) . map ( ( [ workflowId , data ] ) => ( {
70- workflowId ,
71- workflowName : data . workflowName ,
69+ return Array . from ( groups . entries ( ) ) . map ( ( [ canvasId , data ] ) => ( {
70+ canvasId ,
71+ canvasName : data . canvasName ,
7272 nodes : data . nodes ,
7373 } ) ) ;
7474 } , [ integration ?. status ?. usedIn ] ) ;
@@ -248,13 +248,13 @@ export function IntegrationDetails({ organizationId }: IntegrationDetailsProps)
248248 < div className = "space-y-2" >
249249 { workflowGroups . map ( ( group ) => (
250250 < button
251- key = { group . workflowId }
252- onClick = { ( ) => window . open ( `/${ organizationId } /canvases/${ group . workflowId } ` , "_blank" ) }
251+ key = { group . canvasId }
252+ onClick = { ( ) => window . open ( `/${ organizationId } /canvases/${ group . canvasId } ` , "_blank" ) }
253253 className = "w-full flex items-center gap-2 p-3 bg-gray-50 dark:bg-gray-800/50 rounded-md border border-gray-300 dark:border-gray-700 hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors text-left"
254254 >
255255 < div className = "flex-1" >
256256 < p className = "text-sm font-medium text-gray-800 dark:text-gray-100" >
257- Canvas: { group . workflowName }
257+ Canvas: { group . canvasName }
258258 </ p >
259259 < p className = "text-xs text-gray-500 dark:text-gray-400 mt-1" >
260260 Used in { group . nodes . length } node{ group . nodes . length !== 1 ? "s" : "" } :{ " " }
0 commit comments