From 2348848c18b7e88b9aa77388ebf1eeeed9b2d4cc Mon Sep 17 00:00:00 2001 From: ajaythapliyal Date: Sun, 26 Feb 2023 17:19:35 +0530 Subject: [PATCH] this fixes 5 from nick's list --- frontend/src/conversation/Conversation.tsx | 70 +++++++++++----------- 1 file changed, 36 insertions(+), 34 deletions(-) diff --git a/frontend/src/conversation/Conversation.tsx b/frontend/src/conversation/Conversation.tsx index 9a30c4a..89ce3b9 100644 --- a/frontend/src/conversation/Conversation.tsx +++ b/frontend/src/conversation/Conversation.tsx @@ -44,43 +44,45 @@ export default function Conversation() { })} {messages.length === 0 && } -
-
{ - if (e.key === 'Enter' && !e.shiftKey) { - e.preventDefault(); - if (inputRef.current?.textContent && status !== 'loading') { - handleQuestion(inputRef.current.textContent); - inputRef.current.textContent = ''; - } - } - }} - >
- {status === 'loading' ? ( - - ) : ( - { - if (inputRef.current?.textContent) { - handleQuestion(inputRef.current.textContent); - inputRef.current.textContent = ''; +
+
+
{ + if (e.key === 'Enter' && !e.shiftKey) { + e.preventDefault(); + if (inputRef.current?.textContent && status !== 'loading') { + handleQuestion(inputRef.current.textContent); + inputRef.current.textContent = ''; + } } }} - src={Send} - className="relative right-9 cursor-pointer" - > - )} + >
+ {status === 'loading' ? ( + + ) : ( + { + if (inputRef.current?.textContent) { + handleQuestion(inputRef.current.textContent); + inputRef.current.textContent = ''; + } + }} + src={Send} + className="relative right-[35px] bottom-[15px] -mr-[21px] cursor-pointer self-end" + > + )} +
+

+ This is a chatbot that uses the GPT-3, Faiss and LangChain to answer + questions. +

-

- This is a chatbot that uses the GPT-3, Faiss and LangChain to answer - questions. -

); }