Skip to content

Commit

Permalink
fix: build error
Browse files Browse the repository at this point in the history
  • Loading branch information
Jennievon committed Nov 15, 2023
1 parent 9f17cc0 commit 0508423
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions tools/obscuroscan_v3/frontend/src/components/main-nav.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from "react";
import Link from "next/link";
import { useRouter } from "next/router";

import { cn } from "@/src/lib/utils";
import { Button } from "./ui/button";
Expand All @@ -13,7 +14,7 @@ import {

import { ChevronDownIcon } from "@radix-ui/react-icons";
import { NavLink } from "@/src/types/interfaces";
import { useRouter } from "next/router";
import { NavLinks } from "../routes";

interface MainNavProps {
navLinks: NavLink[];
Expand All @@ -29,7 +30,6 @@ const NavItem: React.FC<{ navLink: NavLink }> = ({ navLink }) => {
subNavLink.href && router.pathname.includes(subNavLink.href)
);
};

if (navLink.isDropdown) {
return (
<DropdownMenu>
Expand Down Expand Up @@ -84,12 +84,16 @@ const NavItem: React.FC<{ navLink: NavLink }> = ({ navLink }) => {
}
};

const MainNav = ({ navLinks, className }: MainNavProps) => (
<nav className={cn("flex items-center space-x-4 lg:space-x-6", className)}>
{navLinks.map((navLink) => (
export const MainNav = ({
className,
...props
}: React.HTMLAttributes<HTMLElement>) => (
<nav
className={cn("flex items-center space-x-4 lg:space-x-6", className)}
{...props}
>
{NavLinks.map((navLink) => (
<NavItem key={navLink.label} navLink={navLink} />
))}
</nav>
);

export default MainNav;

0 comments on commit 0508423

Please sign in to comment.