11import { useNavigate } from "@tanstack/react-router" ;
2- import { CircleFadingArrowUp , CopyIcon } from "lucide-react" ;
32import { useCallback , useEffect , useMemo , useRef , useState } from "react" ;
43
54import type { TooltipButtonProps } from "@/components/shared/Buttons/TooltipButton" ;
@@ -126,38 +125,26 @@ const TaskNodeCard = () => {
126125 const actions : Array < TooltipButtonProps > = [ ] ;
127126
128127 if ( ! readOnly ) {
129- actions . push (
130- {
131- children : (
132- < div className = "flex items-center gap-2" >
133- < CopyIcon />
134- </ div >
135- ) ,
136- variant : "outline" ,
137- tooltip : "Duplicate Task" ,
138- onClick : callbacks . onDuplicate ,
139- } ,
140- {
141- children : (
142- < div className = "flex items-center gap-2" >
143- < CircleFadingArrowUp />
144- </ div >
145- ) ,
146- variant : "outline" ,
147- className : cn ( isCustomComponent && "hidden" ) ,
148- tooltip : "Update Task from Source URL" ,
149- onClick : callbacks . onUpgrade ,
150- } ,
151- ) ;
128+ actions . push ( {
129+ children : < Icon name = "Copy" size = "sm" /> ,
130+ variant : "outline" ,
131+ tooltip : "Duplicate Task" ,
132+ onClick : callbacks . onDuplicate ,
133+ } ) ;
134+ }
135+
136+ if ( ! readOnly && ! isCustomComponent ) {
137+ actions . push ( {
138+ children : < Icon name = "CircleFadingArrowUp" size = "sm" /> ,
139+ variant : "outline" ,
140+ tooltip : "Update Task from Source URL" ,
141+ onClick : callbacks . onUpgrade ,
142+ } ) ;
152143 }
153144
154145 if ( isSubgraphNode && taskId && isSubgraphNavigationEnabled ) {
155146 actions . push ( {
156- children : (
157- < div className = "flex items-center gap-2" >
158- < Icon name = "Workflow" size = "sm" />
159- </ div >
160- ) ,
147+ children : < Icon name = "Workflow" size = "sm" /> ,
161148 variant : "outline" ,
162149 tooltip : `Enter Subgraph: ${ subgraphDescription } ` ,
163150 onClick : ( ) => navigateToSubgraph ( taskId ) ,
@@ -166,11 +153,7 @@ const TaskNodeCard = () => {
166153
167154 if ( isInAppEditorEnabled ) {
168155 actions . push ( {
169- children : (
170- < div className = "flex items-center gap-2" >
171- < Icon name = "FilePenLine" size = "sm" />
172- </ div >
173- ) ,
156+ children : < Icon name = "FilePenLine" size = "sm" /> ,
174157 variant : "outline" ,
175158 tooltip : "Edit Component Definition" ,
176159 onClick : handleEditComponent ,
0 commit comments