diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index dc0b2ca..c0a3a9c 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -1,7 +1,7 @@ import { useEffect, useState } from 'react'; import { Routes, Route } from 'react-router-dom'; import Navigation from './components/Navigation/Navigation'; -import DocsGPT from './components/DocsGPT'; +import DocsGPT from './components/DocsGPT/DocsGPT'; import APIKeyModal from './components/APIKeyModal'; import About from './components/About'; @@ -17,6 +17,7 @@ export default function App() { setIsMobile(false); } else { setIsMobile(true); + setIsMenuOpen(false); } }; @@ -48,8 +49,14 @@ export default function App() { setIsApiModalOpen={setIsApiModalOpen} /> - } /> - } /> + } + /> + } + /> ); diff --git a/frontend/src/components/About.tsx b/frontend/src/components/About.tsx index e1173ca..4972afc 100644 --- a/frontend/src/components/About.tsx +++ b/frontend/src/components/About.tsx @@ -1,17 +1,29 @@ -export default function About({ isMenuOpen }: { isMenuOpen: boolean }) { +export default function About({ + isMenuOpen, + isMobile, +}: { + isMenuOpen: boolean; + isMobile: boolean; +}) { //TODO - Add hyperlinks to text //TODO - Styling return ( - //Parent div for all content shown through App.tsx routing needs to have this styling. + //Parent div for all content shown through App.tsx routing needs to have this styling. Might change when state management is updated.

About DocsGPT 🦖

-

+

Find the information in your documentation through AI-powered open-source chatbot. Powered by GPT-3, Faiss and LangChain.

@@ -23,7 +35,7 @@ export default function About({ isMenuOpen }: { isMenuOpen: boolean }) {

1. Navigate to{' '} - /application folder + /application folder

2. Install dependencies from{' '} diff --git a/frontend/src/components/DocsGPT.tsx b/frontend/src/components/DocsGPT.tsx deleted file mode 100644 index 15df78e..0000000 --- a/frontend/src/components/DocsGPT.tsx +++ /dev/null @@ -1,7 +0,0 @@ -export default function DocsGPT({ isMenuOpen }: { isMenuOpen: boolean }) { - return ( -

- Docs GPT Chat Placeholder -
- ); -} diff --git a/frontend/src/components/DocsGPT/DocsGPT.tsx b/frontend/src/components/DocsGPT/DocsGPT.tsx new file mode 100644 index 0000000..37098cb --- /dev/null +++ b/frontend/src/components/DocsGPT/DocsGPT.tsx @@ -0,0 +1,24 @@ +export default function DocsGPT({ + isMenuOpen, + isMobile, +}: { + isMenuOpen: boolean; + isMobile: boolean; +}) { + return ( + //Parent div for all content shown through App.tsx routing needs to have this styling. Might change when state management is updated. +
+ Docs GPT Chat Placeholder +
+ ); +} diff --git a/frontend/src/components/Navigation/Navigation.tsx b/frontend/src/components/Navigation/Navigation.tsx index ce4ba11..73610a4 100644 --- a/frontend/src/components/Navigation/Navigation.tsx +++ b/frontend/src/components/Navigation/Navigation.tsx @@ -1,12 +1,77 @@ import React, { useState } from 'react'; import { NavLink } from 'react-router-dom'; import Arrow1 from './imgs/arrow.svg'; +import Hamburger from './imgs/hamburger.svg'; import Key from './imgs/key.svg'; import Info from './imgs/info.svg'; import Link from './imgs/link.svg'; +import Exit from './imgs/exit.svg'; -function MobileNavigation() { - return
Mobile Navigation
; +function MobileNavigation({ + isMenuOpen, + setIsMenuOpen, + setIsApiModalOpen, +}: { + isMenuOpen: boolean; + setIsMenuOpen: React.Dispatch>; + setIsApiModalOpen: React.Dispatch>; +}) { + //TODO - Need to replace Chat button to open secondary nav with scrollable past chats option and new chat at top + return ( +
+
+ {isMenuOpen ? ( + <> + + + ) : ( + <> + + + )} +
+ {isMenuOpen && ( + + )} +
+ ); } function DesktopNavigation({ @@ -94,7 +159,13 @@ export default function Navigation({ setIsApiModalOpen: React.Dispatch>; }) { if (isMobile) { - return ; + return ( + + ); } else { return ( + + + + + + + + + diff --git a/frontend/src/components/Navigation/imgs/hamburger.svg b/frontend/src/components/Navigation/imgs/hamburger.svg new file mode 100644 index 0000000..cfed15f --- /dev/null +++ b/frontend/src/components/Navigation/imgs/hamburger.svg @@ -0,0 +1,3 @@ + + +