diff --git a/frontend/src/Navigation.tsx b/frontend/src/Navigation.tsx index 6e3b6818..4b49ddbc 100644 --- a/frontend/src/Navigation.tsx +++ b/frontend/src/Navigation.tsx @@ -361,9 +361,7 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) {
-
- -
+
{ const [isOpen, setIsOpen] = useState(false); @@ -30,62 +30,44 @@ const Help = () => { }; }, []); - const dropdownPosition = () => { - if (!buttonRef.current) return { top: '100%', left: '0' }; - - const rect = buttonRef.current.getBoundingClientRect(); - const dropdownHeight = 80; // Adjust based on the content height - const spaceBelow = window.innerHeight - rect.bottom; - - const dropdownWidth = 192; // Adjust to fit your design - const spaceRight = window.innerWidth - rect.right; - - let leftPosition = 0; // Default to align with the button - - if (spaceRight < dropdownWidth) { - leftPosition = dropdownWidth - rect.width; - } - - if (spaceBelow >= dropdownHeight) { - return { top: '100%', left: `${leftPosition}px` }; // Open downward - } else { - return { top: `${-dropdownHeight}px`, left: `${leftPosition}px` }; // Open upward - } - }; - return ( -
+