From c51f12f88bd97577dff246057743beab019dcd1f Mon Sep 17 00:00:00 2001 From: ManishMadan2882 Date: Wed, 15 May 2024 16:31:41 +0530 Subject: [PATCH] (conversation)- taller input field --- frontend/src/Hero.tsx | 82 ++++++++++++---------- frontend/src/conversation/Conversation.tsx | 14 ++-- 2 files changed, 52 insertions(+), 44 deletions(-) diff --git a/frontend/src/Hero.tsx b/frontend/src/Hero.tsx index 9e489889..b12ec441 100644 --- a/frontend/src/Hero.tsx +++ b/frontend/src/Hero.tsx @@ -1,52 +1,60 @@ import { useDarkTheme, useMediaQuery } from './hooks'; import DocsGPT3 from './assets/cute_docsgpt3.svg'; -import SourceDropdown from './components/SourceDropdown'; import { useSelector } from 'react-redux'; -import { selectSourceDocs,selectSelectedDocs,selectConversations,selectModalStateDeleteConv } from './preferences/preferenceSlice'; +import { selectConversations } from './preferences/preferenceSlice'; +import Arrow2 from './assets/dropdown-arrow.svg'; export default function Hero({ className = '' }: { className?: string }) { // const isMobile = window.innerWidth <= 768; const { isMobile } = useMediaQuery(); const [isDarkTheme] = useDarkTheme(); - const docs = useSelector(selectSourceDocs); - const selectedDocs = useSelector(selectSelectedDocs); const conversations = useSelector(selectConversations); - const modalStateDeleteConv = useSelector(selectModalStateDeleteConv); return (
-
-
- DocsGPT - docsgpt +
+
+ DocsGPT + docsgpt
- {/* */} -
-
-
-

Chat with your documentation

- Upload documents and get your answers -
-
-

Chat with your documentation

- Upload documents and get your answers -
-
-

Chat with your documentation

- Upload documents and get your answers -
-
-

Chat with your documentation

- Upload documents and get your answers + +
+
-
- ); +
+
+

+ Chat with your documentation +

+ + Upload documents and get your answers + +
+
+

+ Chat with your documentation +

+ + Upload documents and get your answers + +
+
+

+ Chat with your documentation +

+ + Upload documents and get your answers + +
+
+

+ Chat with your documentation +

+ + Upload documents and get your answers + +
+
+
); } diff --git a/frontend/src/conversation/Conversation.tsx b/frontend/src/conversation/Conversation.tsx index f09ec08a..6839d717 100644 --- a/frontend/src/conversation/Conversation.tsx +++ b/frontend/src/conversation/Conversation.tsx @@ -56,7 +56,7 @@ export default function Conversation() { setHasScrolledToLast(entry.isIntersecting); }); }; - + const observer = new IntersectionObserver(observerCallback, { root: null, threshold: [1, 0.8], @@ -134,7 +134,7 @@ export default function Conversation() {
{queries.length > 0 && !hasScrolledToLast && (
-
-
+
+
{ if (e.key === 'Enter' && !e.shiftKey) { e.preventDefault(); @@ -197,9 +197,9 @@ export default function Conversation() { className="relative right-[38px] bottom-[7px] -mr-[30px] animate-spin cursor-pointer self-end bg-transparent" > ) : ( -
+
{ if (inputRef.current?.textContent) { handleQuestion(inputRef.current.textContent);