Skip to content

Commit 102cf76

Browse files
committed
fix(lint): move IconComponent outside ToolInput to fix noNestedComponentDefinitions
1 parent be7e643 commit 102cf76

1 file changed

Lines changed: 12 additions & 11 deletions

File tree

  • apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/tool-input.tsx

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,18 @@ function createToolIcon(
416416
* - Allows drag-and-drop reordering of selected tools
417417
* - Supports tool usage control (auto/force/none) for compatible LLM providers
418418
*/
419+
420+
function IconComponent({
421+
icon: Icon,
422+
className,
423+
}: {
424+
icon?: React.ComponentType<{ className?: string }>
425+
className?: string
426+
}) {
427+
if (!Icon) return null
428+
return <Icon className={className} />
429+
}
430+
419431
export const ToolInput = memo(function ToolInput({
420432
blockId,
421433
subBlockId,
@@ -1071,17 +1083,6 @@ export const ToolInput = memo(function ToolInput({
10711083
setDragOverIndex(null)
10721084
}
10731085

1074-
const IconComponent = ({
1075-
icon: Icon,
1076-
className,
1077-
}: {
1078-
icon?: React.ComponentType<{ className?: string }>
1079-
className?: string
1080-
}) => {
1081-
if (!Icon) return null
1082-
return <Icon className={className} />
1083-
}
1084-
10851086
const evaluateParameterCondition = (param: ToolParameterConfig, tool: StoredTool): boolean => {
10861087
if (!('uiComponent' in param) || !param.uiComponent?.condition) return true
10871088
const currentValues: Record<string, unknown> = { operation: tool.operation, ...tool.params }

0 commit comments

Comments
 (0)