From 9f3ff154990829c103c49ebe8447217c812d8018 Mon Sep 17 00:00:00 2001 From: Sakamoto Shiina <68018796+ShiinaSakamoto@users.noreply.github.com> Date: Sat, 14 Dec 2024 13:43:13 +0900 Subject: [PATCH] [bugfix/Prepare] Main Page: Message Logs. Remove test code. and hide init invalid endpoint for now. Fix the error 'Uncaught TypeError: currentMessageLogs.data.map is not a function' with change the type obj to array when init. --- src-ui/logics/useReceiveRoutes.js | 2 ++ src-ui/store.js | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src-ui/logics/useReceiveRoutes.js b/src-ui/logics/useReceiveRoutes.js index 0c09da4f..a188dce2 100644 --- a/src-ui/logics/useReceiveRoutes.js +++ b/src-ui/logics/useReceiveRoutes.js @@ -463,6 +463,8 @@ export const useReceiveRoutes = () => { "/get/data/mic_no_speech_prob": ()=>{}, // Not implemented on UI yet "/get/data/speaker_avg_logprob": ()=>{}, // Not implemented on UI yet "/get/data/speaker_no_speech_prob": ()=>{}, // Not implemented on UI yet + "/get/data/convert_message_to_romaji": ()=>{}, // Not implemented on UI yet + "/get/data/convert_message_to_hiragana": ()=>{}, // Not implemented on UI yet }; const error_routes = { diff --git a/src-ui/store.js b/src-ui/store.js index 24c2824f..c9759e93 100644 --- a/src-ui/store.js +++ b/src-ui/store.js @@ -129,7 +129,8 @@ export const { atomInstance: Atom_TranscriptionSendStatus, useHook: useStore_Tra export const { atomInstance: Atom_TranscriptionReceiveStatus, useHook: useStore_TranscriptionReceiveStatus } = createAtomWithHook(false, "TranscriptionReceiveStatus", {is_state_ok: true}); export const { atomInstance: Atom_ForegroundStatus, useHook: useStore_ForegroundStatus } = createAtomWithHook(false, "ForegroundStatus", {is_state_ok: true}); -export const { atomInstance: Atom_MessageLogs, useHook: useStore_MessageLogs } = createAtomWithHook(generateTestData(20), "MessageLogs"); +export const { atomInstance: Atom_MessageLogs, useHook: useStore_MessageLogs } = createAtomWithHook([], "MessageLogs"); +// export const { atomInstance: Atom_MessageLogs, useHook: useStore_MessageLogs } = createAtomWithHook(generateTestData(20), "MessageLogs"); // For testing export const { atomInstance: Atom_MessageInputValue, useHook: useStore_MessageInputValue } = createAtomWithHook("", "MessageInputValue"); export const { atomInstance: Atom_IsVisibleResendButton, useHook: useStore_IsVisibleResendButton } = createAtomWithHook(false, "IsVisibleResendButton"); export const { atomInstance: Atom_IsAppliedInitMessageBoxHeight, useHook: useStore_IsAppliedInitMessageBoxHeight } = createAtomWithHook(false, "IsAppliedInitMessageBoxHeight");