From 83e07b46edade78f73ad92cc55aba9255e3f4f4c Mon Sep 17 00:00:00 2001 From: yyh Date: Sun, 9 Aug 2026 15:48:02 +0800 Subject: [PATCH] refactor(web): remove generated result React.FC --- .../app/configuration/config/automatic/result.tsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/web/app/components/app/configuration/config/automatic/result.tsx b/web/app/components/app/configuration/config/automatic/result.tsx index 72dfdbf59e6092..a633636028f082 100644 --- a/web/app/components/app/configuration/config/automatic/result.tsx +++ b/web/app/components/app/configuration/config/automatic/result.tsx @@ -1,9 +1,8 @@ 'use client' -import type { FC } from 'react' import type { GenRes } from '@/service/debug' import { Button } from '@langgenius/dify-ui/button' import copy from 'copy-to-clipboard' -import * as React from 'react' +import { memo } from 'react' import { useTranslation } from 'react-i18next' import { toast } from '@/app/components/app/configuration/toast' import CodeEditor from '@/app/components/workflow/nodes/llm/components/json-schema-config-modal/code-editor' @@ -24,7 +23,7 @@ type Props = Readonly<{ generatorType: GeneratorType }> -const Result: FC = ({ +const Result = ({ isBasicMode, nodeId, current, @@ -33,7 +32,7 @@ const Result: FC = ({ versions, onApply, generatorType, -}) => { +}: Props) => { const { t } = useTranslation() const isGeneratorPrompt = generatorType === GeneratorType.prompt @@ -94,4 +93,4 @@ const Result: FC = ({ ) } -export default React.memo(Result) +export default memo(Result)