diff --git a/frontend/src/Hero.tsx b/frontend/src/Hero.tsx index 497fc41e2..cd6d4397e 100644 --- a/frontend/src/Hero.tsx +++ b/frontend/src/Hero.tsx @@ -1,191 +1,54 @@ -import { useDarkTheme, useMediaQuery } from './hooks'; import DocsGPT3 from './assets/cute_docsgpt3.svg'; +const demos: { header: string; query: string }[] = [ + { + header: 'Learn about DocsGPT', + query: 'What is DocsGPT?', + }, + { + header: 'Summarise documentation', + query: 'Summarise current context', + }, + { + header: 'Write Code', + query: 'Write code for api request to /api/answer', + }, + { + header: 'Learning Assistance', + query: 'Write potential questions for context', + }, +]; -export default function Hero({ className = '' }: { className?: string }) { - // const isMobile = window.innerWidth <= 768; - const { isMobile } = useMediaQuery(); - const [isDarkTheme] = useDarkTheme(); +export default function Hero({ + handleQuestion, +}: { + handleQuestion: (question: string) => void; +}) { return (
-
-

DocsGPT

- DocsGPT -
- {isMobile ? ( -

- Welcome to DocsGPT, your technical - documentation assistant! Start by entering your query in the input - field below, and we'll provide you with the most relevant - answers. -

- ) : ( - <> -

- Welcome to DocsGPT, your technical documentation assistant! -

-

- Enter a query related to the information in the documentation you - selected to receive -
and we will provide you with the most relevant answers. -

-

- Start by entering your query in the input field below and we will do - the rest! -

- - )} -
- {/* first */} -
-
- {/* Add Mobile check here */} - {isMobile ? ( -
- lock -

- Chat with Your Data -

-
- ) : ( - <> - lock -

- Chat with Your Data -

- - )} -

- DocsGPT will use your data to answer questions. Whether its - documentation, source code, or Microsoft files, DocsGPT allows you - to have interactive conversations and find answers based on the - provided data. -

-
-
- {/* second */} -
-
- {/* Add Mobile check here */} - {isMobile ? ( -
- lock -

- Secure Data Storage -

-
- ) : ( - <> - lock -

- Secure Data Storage -

- - )} -

- The security of your data is our top priority. DocsGPT ensures the - utmost protection for your sensitive information. With secure data - storage and privacy measures in place, you can trust that your - data is kept safe and confidential. -

-
+
+
+ DocsGPT + docsgpt
- {/* third */} -
-
- {/* Add Mobile check here */} - {isMobile ? ( -
- lock -

- Open Source Code -

-
- ) : ( - <> - lock -

- Open Source Code -

- - )} -

+
+
+ {demos.map((demo) => ( + <> +
-
+

+ {demo.header} +

+ {demo.query} + + + ))}
); diff --git a/frontend/src/conversation/Conversation.tsx b/frontend/src/conversation/Conversation.tsx index 09a49d9cd..05c8638c0 100644 --- a/frontend/src/conversation/Conversation.tsx +++ b/frontend/src/conversation/Conversation.tsx @@ -131,11 +131,11 @@ export default function Conversation() { }; return ( -
+
{queries.length > 0 && !hasScrolledToLast && (