diff --git a/src/app/components/Navbar.tsx b/src/app/components/Navbar.tsx index ce4c0bd1..fc22c9d4 100644 --- a/src/app/components/Navbar.tsx +++ b/src/app/components/Navbar.tsx @@ -1,9 +1,10 @@ "use client"; -import React, { useState } from "react"; +import React, { use, useState } from "react"; import { Transition } from "@headlessui/react"; import ProfileDropDown from "./ProfileDropDown"; import { signOut } from "next-auth/react"; +import { usePathname } from "next/navigation"; function makeLink(href: string, label: string) { return ( @@ -16,7 +17,13 @@ function makeLink(href: string, label: string) { ); } -function Nav({ pageName }: { pageName: string }) { +function Nav() { + const pathname = usePathname(); + + if (pathname === "/") { + return null; + } + const [isOpen, setIsOpen] = useState(false); return (