From 21bddfd1834e2ef4ddf5b2f62e75ee3815799e5c Mon Sep 17 00:00:00 2001 From: SuperSimpleDev Date: Wed, 20 Nov 2024 15:31:19 -0500 Subject: [PATCH] 4j Solution --- 2-copy-of-code/lesson-04/chatbot.html | 28 +++++++++++---------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/2-copy-of-code/lesson-04/chatbot.html b/2-copy-of-code/lesson-04/chatbot.html index f7103bb..32bb485 100755 --- a/2-copy-of-code/lesson-04/chatbot.html +++ b/2-copy-of-code/lesson-04/chatbot.html @@ -76,6 +76,11 @@ scrollbar-width: none; -ms-overflow-style: none; } + + .welcome-message { + color: rgb(120, 120, 120); + text-align: center; + } @@ -198,29 +203,18 @@ } function App() { - const [chatMessages, setChatMessages] = React.useState([{ - message: 'hello chatbot', - sender: 'user', - id: 'id1' - }, { - message: 'Hello! How can I help you?', - sender: 'robot', - id: 'id2' - }, { - message: 'can you get me todays date?', - sender: 'user', - id: 'id3' - }, { - message: 'Today is September 27', - sender: 'robot', - id: 'id4' - }]); + const [chatMessages, setChatMessages] = React.useState([]); // const [chatMessages, setChatMessages] = array; // const chatMessages = array[0]; // const setChatMessages = array[1]; return (
+ {chatMessages.length === 0 && ( +

+ Welcome to the chatbot project! Send a message using the textbox below. +

+ )}