[Perf/bugfix] Separate custom hooks and prevent re-render issues.
Config Page: Device Tab. threshold component. fix problem that the input component focused out when input something each time. Set threshold data when started python.
This commit is contained in:
@@ -4,14 +4,14 @@ import SendMessageSvg from "@images/send_message.svg?react";
|
||||
import { useMessage } from "@logics/useMessage";
|
||||
import { store, useEnableAutoClearMessageBox } from "@store";
|
||||
import { scrollToBottom } from "@logics/scrollToBottom";
|
||||
import { useConfig } from "@logics/useConfig";
|
||||
import { useSendMessageButtonType } from "@logics_configs/useSendMessageButtonType";
|
||||
|
||||
export const MessageInputBox = () => {
|
||||
const [inputValue, setInputValue] = useState("");
|
||||
const { sendMessage } = useMessage();
|
||||
|
||||
const { currentEnableAutoClearMessageBox } = useEnableAutoClearMessageBox();
|
||||
const { currentSendMessageButtonType } = useConfig();
|
||||
const { currentSendMessageButtonType } = useSendMessageButtonType();
|
||||
|
||||
const onSubmitFunction = (e) => {
|
||||
e.preventDefault();
|
||||
|
||||
Reference in New Issue
Block a user