From c7fb528a677ec6de2b6476011fccc0367226d11b Mon Sep 17 00:00:00 2001 From: archer <545436317@qq.com> Date: Tue, 5 Mar 2024 09:48:26 +0800 Subject: [PATCH] fix: classify question connection type --- projects/app/src/components/core/module/Flow/FlowProvider.tsx | 4 ++-- projects/app/src/pages/login/components/RegisterForm.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/app/src/components/core/module/Flow/FlowProvider.tsx b/projects/app/src/components/core/module/Flow/FlowProvider.tsx index 865f3d53b982..e3cbb182591c 100644 --- a/projects/app/src/components/core/module/Flow/FlowProvider.tsx +++ b/projects/app/src/components/core/module/Flow/FlowProvider.tsx @@ -178,7 +178,7 @@ export const FlowProvider = ({ const source = nodes.find((node) => node.id === connect.source)?.data; const sourceType = (() => { if (source?.flowType === FlowNodeTypeEnum.classifyQuestion) { - return ModuleIOValueTypeEnum.string; + return ModuleIOValueTypeEnum.boolean; } if (source?.flowType === FlowNodeTypeEnum.pluginInput) { return source?.inputs.find((input) => input.key === connect.sourceHandle)?.valueType; @@ -189,7 +189,7 @@ export const FlowProvider = ({ const targetType = nodes .find((node) => node.id === connect.target) ?.data?.inputs.find((input) => input.key === connect.targetHandle)?.valueType; - + console.log(source, targetType); if (!sourceType || !targetType) { return toast({ status: 'warning', diff --git a/projects/app/src/pages/login/components/RegisterForm.tsx b/projects/app/src/pages/login/components/RegisterForm.tsx index 93a09a77f676..e7ba46a5fa24 100644 --- a/projects/app/src/pages/login/components/RegisterForm.tsx +++ b/projects/app/src/pages/login/components/RegisterForm.tsx @@ -85,7 +85,7 @@ const RegisterForm = ({ setPageType, loginSuccess }: Props) => { } setRequesting(false); }, - [loginSuccess, toast] + [loginSuccess, t, toast] ); return (