Skip to content

Commit

Permalink
Added nav link to members page
Browse files Browse the repository at this point in the history
  • Loading branch information
Geethika-Kancharla committed Aug 16, 2024
1 parent 709737c commit b266ede
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions components/ui/CollapsibleSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const CollapsibleSection = forwardRef<HTMLDivElement, CollapsibleSectionProps>(

useEffect(() => {
if (isOpen && localRef.current) {

const offset = 200; // Adjust this value to match the height of your navbar
const bodyRect = document.body.getBoundingClientRect().top;
const elementRect = localRef.current.getBoundingClientRect().top;
Expand All @@ -26,9 +27,11 @@ const CollapsibleSection = forwardRef<HTMLDivElement, CollapsibleSectionProps>(
top: offsetPosition,
behavior: 'smooth',
});

}
}, [isOpen]);


return (
<div className="border-b border-gray-700" ref={localRef}>
<div
Expand Down
3 changes: 3 additions & 0 deletions components/ui/mobile-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ export default function MobileMenu() {
<li>
<Link href="/leads" className="flex font-medium w-full text-gray-300 hover:text-white py-2 justify-center" onClick={() => setMobileNavOpen(false)}>Leads</Link>
</li>
<li>
<Link href="/members" className="flex font-medium w-full text-gray-300 hover:text-white py-2 justify-center" onClick={() => setMobileNavOpen(false)}>Members</Link>
</li>
<li>
<Link href="/achievements" className="flex font-medium w-full text-gray-300 hover:text-white py-2 justify-center" onClick={() => setMobileNavOpen(false)}>Achievements</Link>
</li>
Expand Down

0 comments on commit b266ede

Please sign in to comment.