From b91068d658a969c0e478b4dc093ad84aaaa4a93e Mon Sep 17 00:00:00 2001 From: ManishMadan2882 Date: Fri, 17 May 2024 18:07:06 +0530 Subject: [PATCH] (navbar): shrink navbar --- frontend/src/Navigation.tsx | 103 +++++++++++++++++-------------- frontend/src/assets/TwitterX.svg | 3 + 2 files changed, 61 insertions(+), 45 deletions(-) create mode 100644 frontend/src/assets/TwitterX.svg diff --git a/frontend/src/Navigation.tsx b/frontend/src/Navigation.tsx index 2e58b3a8..9c5df178 100644 --- a/frontend/src/Navigation.tsx +++ b/frontend/src/Navigation.tsx @@ -1,21 +1,15 @@ import { useEffect, useRef, useState } from 'react'; import { useDispatch, useSelector } from 'react-redux'; import { NavLink, useNavigate } from 'react-router-dom'; -import PropTypes from 'prop-types'; import DocsGPT3 from './assets/cute_docsgpt3.svg'; -import Documentation from './assets/documentation.svg'; -import DocumentationDark from './assets/documentation-dark.svg'; import Discord from './assets/discord.svg'; -import DiscordDark from './assets/discord-dark.svg'; import Expand from './assets/expand.svg'; import Github from './assets/github.svg'; -import GithubDark from './assets/github-dark.svg'; import Hamburger from './assets/hamburger.svg'; import HamburgerDark from './assets/hamburger-dark.svg'; import Info from './assets/info.svg'; -import InfoDark from './assets/info-dark.svg'; import SettingGear from './assets/settingGear.svg'; -import SettingGearDark from './assets/settingGear-dark.svg'; +import Twitter from './assets/TwitterX.svg'; import Add from './assets/add.svg'; import UploadIcon from './assets/upload.svg'; import { ActiveState } from './models/misc'; @@ -50,21 +44,21 @@ interface NavigationProps { navOpen: boolean; setNavOpen: React.Dispatch>; } -const NavImage: React.FC<{ +/* const NavImage: React.FC<{ Light: string | undefined; Dark: string | undefined; }> = ({ Light, Dark }) => { return ( <> icon - icon + icon ); }; NavImage.propTypes = { Light: PropTypes.string, Dark: PropTypes.string, -}; +}; */ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) { const dispatch = useDispatch(); const docs = useSelector(selectSourceDocs); @@ -274,7 +268,7 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) { New Chat

-
+
{conversations && conversations.length > 0 ? (
@@ -327,13 +321,17 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) { }` } > - + icon

Settings

-
+
@@ -342,39 +340,54 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) { }` } > - -

About

+ icon +

About

- - - -

Documentation

-
- - - {/* discord-link */} -

Visit our Discord

-
- - - -

Visit our Github

-
+
+ + discord + + + x + + + github + +
diff --git a/frontend/src/assets/TwitterX.svg b/frontend/src/assets/TwitterX.svg new file mode 100644 index 00000000..a89d8b82 --- /dev/null +++ b/frontend/src/assets/TwitterX.svg @@ -0,0 +1,3 @@ + + +