diff --git a/web/app/components/workflow/nodes/agent/components/tool-condition/condition-item.tsx b/web/app/components/workflow/nodes/agent/components/tool-condition/condition-item.tsx index b8b9608c3c..86d4047097 100644 --- a/web/app/components/workflow/nodes/agent/components/tool-condition/condition-item.tsx +++ b/web/app/components/workflow/nodes/agent/components/tool-condition/condition-item.tsx @@ -1,4 +1,4 @@ -import { useCallback, useState } from 'react' +import { memo, useCallback, useState } from 'react' import { useTranslation } from 'react-i18next' import { RiDeleteBinLine } from '@remixicon/react' import { produce } from 'immer' @@ -190,4 +190,4 @@ const ConditionItem = ({ ) } -export default ConditionItem +export default memo(ConditionItem) diff --git a/web/app/components/workflow/nodes/agent/components/tool-condition/condition-list.tsx b/web/app/components/workflow/nodes/agent/components/tool-condition/condition-list.tsx index 6d9a11d509..b745bacb7f 100644 --- a/web/app/components/workflow/nodes/agent/components/tool-condition/condition-list.tsx +++ b/web/app/components/workflow/nodes/agent/components/tool-condition/condition-list.tsx @@ -1,5 +1,5 @@ import { RiLoopLeftLine } from '@remixicon/react' -import { useMemo } from 'react' +import { memo, useMemo } from 'react' import ConditionItem from './condition-item' import type { AgentToolCondition, @@ -69,4 +69,4 @@ const ConditionList = ({ ) } -export default ConditionList +export default memo(ConditionList) diff --git a/web/app/components/workflow/nodes/agent/components/tool-condition/editor.tsx b/web/app/components/workflow/nodes/agent/components/tool-condition/editor.tsx index 934b30be4b..8f192496dd 100644 --- a/web/app/components/workflow/nodes/agent/components/tool-condition/editor.tsx +++ b/web/app/components/workflow/nodes/agent/components/tool-condition/editor.tsx @@ -1,6 +1,6 @@ 'use client' -import { useCallback, useMemo } from 'react' +import { memo, useCallback, useMemo } from 'react' import { useTranslation } from 'react-i18next' import { v4 as uuid4 } from 'uuid' import { produce } from 'immer' @@ -155,4 +155,4 @@ const AgentToolConditionEditor = ({ ) } -export default AgentToolConditionEditor +export default memo(AgentToolConditionEditor)