From cdf9789d20155690dca27a1937c4cef0ab16b581 Mon Sep 17 00:00:00 2001 From: Jorge Menjivar Date: Sat, 21 Oct 2023 16:09:07 -0700 Subject: [PATCH] [fix] bug causing msgs being cleared from UI --- .../Home/components/ChatZone/Screens/Chat/ChatMessage.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/components/Home/components/ChatZone/Screens/Chat/ChatMessage.tsx b/components/Home/components/ChatZone/Screens/Chat/ChatMessage.tsx index a453beef..80e34cb3 100644 --- a/components/Home/components/ChatZone/Screens/Chat/ChatMessage.tsx +++ b/components/Home/components/ChatZone/Screens/Chat/ChatMessage.tsx @@ -9,11 +9,10 @@ import { import { FC, memo, useContext, useEffect, useRef, useState } from 'react'; import { useTranslation } from 'next-i18next'; -import Image from 'next/image'; import { storageDeleteMessages } from '@/utils/app/storage/messages'; -import { Conversation, Message } from '@/types/chat'; +import { Message } from '@/types/chat'; import HomeContext from '@/components/Home/home.context'; import { CodeBlock } from '@/components/Markdown/CodeBlock'; @@ -38,7 +37,7 @@ export const ChatMessage: FC = memo( const { state: { database, - conversations, + messages, messageIsStreaming, selectedConversation, user, @@ -108,7 +107,7 @@ export const ChatMessage: FC = memo( database!, user!, messagesToBeDeleted, - selectedConversationMessages, + messages, ); homeDispatch({ field: 'messages', value: updatedMessages }); };