fix
Showing
2 changed files
with
6 additions
and
4 deletions
| ... | @@ -23,6 +23,8 @@ function App() { | ... | @@ -23,6 +23,8 @@ function App() { |
| 23 | // clear chats | 23 | // clear chats |
| 24 | function clearChat(){ | 24 | function clearChat(){ |
| 25 | setChatLog([]); | 25 | setChatLog([]); |
| 26 | setChatInput(""); | ||
| 27 | setStartedInteraction(false); | ||
| 26 | } | 28 | } |
| 27 | 29 | ||
| 28 | function getEngines(){ | 30 | function getEngines(){ |
| ... | @@ -113,7 +115,7 @@ function App() { | ... | @@ -113,7 +115,7 @@ function App() { |
| 113 | } | 115 | } |
| 114 | 116 | ||
| 115 | } | 117 | } |
| 116 | 118 | const [startedInteraction, setStartedInteraction] = useState(false); | |
| 117 | return ( | 119 | return ( |
| 118 | <div className="App"> | 120 | <div className="App"> |
| 119 | <SideMenu | 121 | <SideMenu |
| ... | @@ -129,6 +131,8 @@ function App() { | ... | @@ -129,6 +131,8 @@ function App() { |
| 129 | chatInput={chatInput} | 131 | chatInput={chatInput} |
| 130 | chatLog={chatLog} | 132 | chatLog={chatLog} |
| 131 | setChatInput={setChatInput} | 133 | setChatInput={setChatInput} |
| 134 | startedInteraction={startedInteraction} | ||
| 135 | setStartedInteraction={setStartedInteraction} | ||
| 132 | handleSubmit={handleSubmit} /> | 136 | handleSubmit={handleSubmit} /> |
| 133 | </div> | 137 | </div> |
| 134 | ); | 138 | ); | ... | ... |
| 1 | import React, { useState } from "react"; | 1 | import React, { useState } from "react"; |
| 2 | import SuggestedOptions from './suggestedOptions' | 2 | import SuggestedOptions from './suggestedOptions' |
| 3 | 3 | ||
| 4 | const ChatBox = ({chatLog, setChatInput, handleSubmit, chatInput}) => { | 4 | const ChatBox = ({chatLog, setChatInput, handleSubmit, chatInput, startedInteraction, setStartedInteraction}) => { |
| 5 | |||
| 6 | const [startedInteraction, setStartedInteraction] = useState(false); | ||
| 7 | 5 | ||
| 8 | return ( | 6 | return ( |
| 9 | <section className="chatbox"> | 7 | <section className="chatbox"> | ... | ... |
-
Please register or sign in to post a comment