Skip to content

Commit

Permalink
Fix: put back the handleClick function
Browse files Browse the repository at this point in the history
  • Loading branch information
teoh4770 committed Mar 29, 2024
1 parent 5b591f7 commit f006ac6
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/components/Navbar/NavItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ interface NavItemsProps {
handleClick: () => void;
}

// update the name of href
const links = [
{ title: 'About', href: 'about-anchor' },
{ title: 'Sponsors', href: 'sponsors-anchor' },
Expand All @@ -20,15 +19,8 @@ const colStyle = 'flex-col lg:p-0';
const navbarHeightPx = 80;
const scrollPaddingPx = -(navbarHeightPx + 20); // navbarHeight + extra padding

/**
if href is team anchor,
then increase the offset
otherwise
keep them the same

*/

const NavItems: React.FC<NavItemsProps> = ({ isHorizontal }) => {
const NavItems: React.FC<NavItemsProps> = ({ isHorizontal, handleClick }) => {
return (
<ul
className={`flex gap-7 text-deepMarine ${
Expand All @@ -43,6 +35,7 @@ const NavItems: React.FC<NavItemsProps> = ({ isHorizontal }) => {
duration={500}
offset={scrollPaddingPx}
className="text-md w-full"
onClick={handleClick}
>
{link.title}
</Link>
Expand Down

0 comments on commit f006ac6

Please sign in to comment.