From 4b69f99d0a7dee536473fc7357af25c1b9b9f1d6 Mon Sep 17 00:00:00 2001 From: FanisNgv Date: Thu, 12 Sep 2024 14:31:00 +0300 Subject: [PATCH] empty messages problem solved --- frontend/src/app/components/MessageList.tsx | 30 +++++++++++---------- frontend/src/app/page.tsx | 2 +- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/frontend/src/app/components/MessageList.tsx b/frontend/src/app/components/MessageList.tsx index 99f9dcc..466e09d 100644 --- a/frontend/src/app/components/MessageList.tsx +++ b/frontend/src/app/components/MessageList.tsx @@ -17,20 +17,22 @@ export default function MessageList({ messages }: MessageListProps) { {messages.map((msg) => ( - -
- {msg.text} -
-
+ msg.text && ( + +
+ {msg.text} +
+
+ ) ))}
diff --git a/frontend/src/app/page.tsx b/frontend/src/app/page.tsx index 0472e35..13467ed 100644 --- a/frontend/src/app/page.tsx +++ b/frontend/src/app/page.tsx @@ -27,5 +27,5 @@ export default function Home() { redirectToConversation(); }, [router, config.ENDPOINT]); - return null; // или можно вернуть компонент загрузки + return null; } \ No newline at end of file