diff --git a/frontend/src/Navigation.tsx b/frontend/src/Navigation.tsx index 92347ab6..621ae96b 100644 --- a/frontend/src/Navigation.tsx +++ b/frontend/src/Navigation.tsx @@ -11,7 +11,6 @@ import Discord from './assets/discord.svg'; import Expand from './assets/expand.svg'; import Github from './assets/github.svg'; import Hamburger from './assets/hamburger.svg'; -import Info from './assets/info.svg'; import InfoDark from './assets/info-dark.svg'; import SettingGear from './assets/settingGear.svg'; import Twitter from './assets/TwitterX.svg'; @@ -362,24 +361,27 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) {
-
- +
+ { - if (selectedOption.value === "documentation") { - window.open(" https://docs.docsgpt.cloud/", "_blank"); - } else if (selectedOption.value === "email"){ + contentSize="50" + options={[ + { label: 'Docs', value: 'documentation' }, + { label: 'Email Us', value: 'email' }, + ]} + onSelect={(selectedOption: { + label: string; + value: string; + }) => { + if (selectedOption.value === 'documentation') { + window.open(' https://docs.docsgpt.cloud/', '_blank'); + } else if (selectedOption.value === 'email') { window.location.href = `mailto:contact@arc53.com`; } }} - /> + />
(null); const [isOpen, setIsOpen] = React.useState(false); - const [dropdownPosition, setDropdownPosition] = React.useState({ top: 0}); - + const [dropdownPosition, setDropdownPosition] = React.useState({ top: 0 }); + const borderRadius = rounded === 'xl' ? 'rounded-xl' : 'rounded-3xl'; const borderTopRadius = rounded === 'xl' ? 'rounded-t-xl' : 'rounded-t-3xl'; const handleClickOutside = (event: MouseEvent) => { - if (dropdownRef.current && !dropdownRef.current.contains(event.target as Node)) { + if ( + dropdownRef.current && + !dropdownRef.current.contains(event.target as Node) + ) { setIsOpen(false); } }; @@ -66,7 +69,7 @@ function Dropdown({ }, []); const handleToggleDropdown = () => { - setIsOpen(prev => !prev); + setIsOpen((prev) => !prev); if (!isOpen) { adjustDropdownPosition(); } @@ -80,7 +83,10 @@ function Dropdown({ // Check if dropdown overflows the bottom of the viewport const newPosition = { - top: rect.bottom + dropdownMenuHeight > viewportHeight ? -dropdownMenuHeight : 0, + top: + rect.bottom + dropdownMenuHeight > viewportHeight + ? -dropdownMenuHeight + : 0, left: 0, }; @@ -90,7 +96,12 @@ function Dropdown({ return (
{isOpen && (
- {typeof option === 'string' ? option : option.name || option.label || option.description} + {typeof option === 'string' + ? option + : option.name || option.label || option.description} {showEdit && onEdit && (