From 1b5b36a96d03fdb5b2ed18864e85968805fc4945 Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Fri, 29 Sep 2023 10:05:21 -0300 Subject: [PATCH] retrievin key from backend --- src/frontend/src/modals/formModal/index.tsx | 5 ++--- src/frontend/src/types/components/index.ts | 24 ++++++++++----------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/src/frontend/src/modals/formModal/index.tsx b/src/frontend/src/modals/formModal/index.tsx index f7ef02d26..d74980183 100644 --- a/src/frontend/src/modals/formModal/index.tsx +++ b/src/frontend/src/modals/formModal/index.tsx @@ -220,7 +220,6 @@ export default function FormModal({ files?: Array; }) => { if (chatItem.message) { - let key = Object.keys(chatItem.message)[0]; newChatHistory.push( chatItem.files ? { @@ -229,14 +228,14 @@ export default function FormModal({ template: chatItem.template, thought: chatItem.intermediate_steps, files: chatItem.files, - chatKey: key, + chatKey: chatItem.chatKey, } : { isSend: !chatItem.is_bot, message: chatItem.message, template: chatItem.template, thought: chatItem.intermediate_steps, - chatKey: key, + chatKey: chatItem.chatKey, } ); } diff --git a/src/frontend/src/types/components/index.ts b/src/frontend/src/types/components/index.ts index 7c3af1d92..915ae2928 100644 --- a/src/frontend/src/types/components/index.ts +++ b/src/frontend/src/types/components/index.ts @@ -136,18 +136,18 @@ export type TooltipComponentType = { children: ReactElement; title: string | ReactElement; placement?: - | "bottom-end" - | "bottom-start" - | "bottom" - | "left-end" - | "left-start" - | "left" - | "right-end" - | "right-start" - | "right" - | "top-end" - | "top-start" - | "top"; + | "bottom-end" + | "bottom-start" + | "bottom" + | "left-end" + | "left-start" + | "left" + | "right-end" + | "right-start" + | "right" + | "top-end" + | "top-start" + | "top"; }; export type ProgressBarType = {