From 9ddb7bd1bb9e32c44ead06df2e65aecd92a03435 Mon Sep 17 00:00:00 2001 From: Luciano Oliva Bianco Date: Mon, 23 Sep 2024 19:09:13 -0300 Subject: [PATCH] More modifications to header --- packages/nextjs/components/Header.tsx | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/packages/nextjs/components/Header.tsx b/packages/nextjs/components/Header.tsx index 8937907..de190de 100644 --- a/packages/nextjs/components/Header.tsx +++ b/packages/nextjs/components/Header.tsx @@ -5,7 +5,7 @@ import Link from "next/link"; import { usePathname } from "next/navigation"; // import Image from "next/image"; import { useAccount } from "wagmi"; -import { Bars3Icon, PhotoIcon, ShoppingBagIcon, UserIcon } from "@heroicons/react/24/outline"; +import { Bars3Icon } from "@heroicons/react/24/outline"; import { FaucetButton, RainbowKitCustomConnectButton } from "~~/components/scaffold-eth"; import { useOutsideClick, useScaffoldReadContract } from "~~/hooks/scaffold-eth"; @@ -17,14 +17,12 @@ type HeaderMenuLink = { export const menuLinks: HeaderMenuLink[] = [ { - label: "Marketplace", + label: "Explore", href: "/", - icon: , }, { label: "Create", href: "/create", - icon: , }, ]; @@ -42,7 +40,7 @@ export const HeaderMenuLinks = () => { passHref className={`${ isActive ? "text-blue-600 font-bold" : "" - } hover:text-blue-600 font-bold py-0 px-3 text-sm rounded-full gap-2 grid grid-flow-col no-bg no-shadow`} + } hover:text-blue-600 font-bold py-3 px-3 text-sm rounded-full gap-2 grid grid-flow-col no-bg no-shadow`} > {icon} {label} @@ -61,7 +59,7 @@ export const Header = () => { const [isDrawerOpen, setIsDrawerOpen] = useState(false); const [isMenuOpen, setIsMenuOpen] = useState(false); - const pathname = usePathname(); // Add this line to track the active route + // const pathname = usePathname(); // Add this line to track the active route const { address: connectedAddress, isConnected } = useAccount(); @@ -74,7 +72,7 @@ export const Header = () => { const defaultProfilePicture = "https://ipfs.io/ipfs/QmVCvzEQHFKzAYSsou8jEJtWdFj31n2XgPpbLjbZqui4YY"; - const profilePicture = profileInfo ? profileInfo[2] : defaultProfilePicture; + const profilePicture = profileInfo && profileInfo[2] ? profileInfo[2] : defaultProfilePicture; const burgerMenuRef = useRef(null); useOutsideClick( @@ -111,18 +109,6 @@ export const Header = () => { }} > - {/* Add My Profile to mobile dropdown */} -
  • - - - My Profile - -
  • )} @@ -136,7 +122,7 @@ export const Header = () => { -
    +
    {isConnected ? (