[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:
Sakamoto Shiina
2024-09-10 17:21:03 +09:00
parent 37989d5f7a
commit ac6b898a46
23 changed files with 514 additions and 443 deletions

View File

@@ -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();