From 490271c75a0406f29e4245af9cbf3f714ef31964 Mon Sep 17 00:00:00 2001 From: ONLY-yours <1349021570@qq.com> Date: Wed, 7 Feb 2024 11:07:56 +0800 Subject: [PATCH] :bug: fix: slove button loading not work --- src/ProChat/components/InputArea/index.tsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/ProChat/components/InputArea/index.tsx b/src/ProChat/components/InputArea/index.tsx index 53d9a80c..08014f57 100644 --- a/src/ProChat/components/InputArea/index.tsx +++ b/src/ProChat/components/InputArea/index.tsx @@ -6,7 +6,6 @@ import { Flexbox } from 'react-layout-kit'; import { useStore } from '../../store'; -import { useMergedState } from 'rc-util'; import ActionBar from './ActionBar'; import { AutoCompleteTextArea } from './AutoCompleteTextArea'; @@ -77,13 +76,9 @@ export const ChatInputArea = (props: ChatInputAreaProps) => { const { styles, theme } = useStyles(); const { mobile } = useResponsive(); - const [ButtonLoading, setButtonLoading] = useMergedState(isLoading); - const send = async () => { if (onSend) { - setButtonLoading(true); const success = await onSend(message); - setButtonLoading(false); if (success) { sendMessage(message); setMessage(''); @@ -140,7 +135,7 @@ export const ChatInputArea = (props: ChatInputAreaProps) => { /> {mobile ? null : (