11import { useNavigate } from "@tanstack/react-router" ;
22import { useStore } from "@xyflow/react" ;
3- import { CircleFadingArrowUp , CopyIcon } from "lucide-react" ;
43import { useCallback , useEffect , useMemo , useRef , useState } from "react" ;
54
65import type { TooltipButtonProps } from "@/components/shared/Buttons/TooltipButton" ;
@@ -132,38 +131,26 @@ const TaskNodeCard = () => {
132131 const actions : Array < TooltipButtonProps > = [ ] ;
133132
134133 if ( ! readOnly ) {
135- actions . push (
136- {
137- children : (
138- < div className = "flex items-center gap-2" >
139- < CopyIcon />
140- </ div >
141- ) ,
142- variant : "outline" ,
143- tooltip : "Duplicate Task" ,
144- onClick : callbacks . onDuplicate ,
145- } ,
146- {
147- children : (
148- < div className = "flex items-center gap-2" >
149- < CircleFadingArrowUp />
150- </ div >
151- ) ,
152- variant : "outline" ,
153- className : cn ( isCustomComponent && "hidden" ) ,
154- tooltip : "Update Task from Source URL" ,
155- onClick : callbacks . onUpgrade ,
156- } ,
157- ) ;
134+ actions . push ( {
135+ children : < Icon name = "Copy" size = "sm" /> ,
136+ variant : "outline" ,
137+ tooltip : "Duplicate Task" ,
138+ onClick : callbacks . onDuplicate ,
139+ } ) ;
140+ }
141+
142+ if ( ! readOnly && ! isCustomComponent ) {
143+ actions . push ( {
144+ children : < Icon name = "CircleFadingArrowUp" size = "sm" /> ,
145+ variant : "outline" ,
146+ tooltip : "Update Task from Source URL" ,
147+ onClick : callbacks . onUpgrade ,
148+ } ) ;
158149 }
159150
160151 if ( isSubgraphNode && taskId && isSubgraphNavigationEnabled ) {
161152 actions . push ( {
162- children : (
163- < div className = "flex items-center gap-2" >
164- < Icon name = "Workflow" size = "sm" />
165- </ div >
166- ) ,
153+ children : < Icon name = "Workflow" size = "sm" /> ,
167154 variant : "outline" ,
168155 tooltip : `Enter Subgraph: ${ subgraphDescription } ` ,
169156 onClick : ( ) => navigateToSubgraph ( taskId ) ,
@@ -172,11 +159,7 @@ const TaskNodeCard = () => {
172159
173160 if ( isInAppEditorEnabled ) {
174161 actions . push ( {
175- children : (
176- < div className = "flex items-center gap-2" >
177- < Icon name = "FilePenLine" size = "sm" />
178- </ div >
179- ) ,
162+ children : < Icon name = "FilePenLine" size = "sm" /> ,
180163 variant : "outline" ,
181164 tooltip : "Edit Component Definition" ,
182165 onClick : handleEditComponent ,
0 commit comments