11"use client" ;
22
3- import React , { useRef } from "react" ;
3+ import React from "react" ;
44import Image from "next/image" ;
55import Link from "next/link" ;
66import { usePathname } from "next/navigation" ;
7- import { Bars3Icon , CodeBracketIcon } from "@heroicons/react/24/outline" ;
8- import { useOutsideClick } from "~~/hooks/scaffold-eth" ;
7+ import { CodeBracketIcon } from "@heroicons/react/24/outline" ;
98
109type HeaderMenuLink = {
1110 label : string ;
@@ -55,27 +54,9 @@ export const HeaderMenuLinks = () => {
5554 * Site header
5655 */
5756export const Header = ( ) => {
58- const burgerMenuRef = useRef < HTMLDetailsElement > ( null ) ;
59- useOutsideClick ( burgerMenuRef , ( ) => {
60- burgerMenuRef ?. current ?. removeAttribute ( "open" ) ;
61- } ) ;
62-
6357 return (
6458 < div className = "sticky lg:static top-0 navbar bg-base-100 min-h-0 shrink-0 justify-between z-20 shadow-md shadow-secondary px-0 sm:px-2" >
6559 < div className = "navbar-start w-auto lg:w-1/2" >
66- < details className = "dropdown" ref = { burgerMenuRef } >
67- < summary className = "ml-1 btn btn-ghost lg:hidden hover:bg-transparent" >
68- < Bars3Icon className = "h-1/2" />
69- </ summary >
70- < ul
71- className = "menu menu-compact dropdown-content mt-3 p-2 shadow-sm bg-base-100 rounded-box w-52"
72- onClick = { ( ) => {
73- burgerMenuRef ?. current ?. removeAttribute ( "open" ) ;
74- } }
75- >
76- < HeaderMenuLinks />
77- </ ul >
78- </ details >
7960 < Link href = "/" passHref className = "hidden lg:flex items-center gap-2 ml-4 mr-6 shrink-0" >
8061 < div className = "flex relative w-10 h-10" >
8162 < Image alt = "SE2 logo" className = "cursor-pointer" fill src = "/logo.svg" />
@@ -85,7 +66,7 @@ export const Header = () => {
8566 < span className = "font-bold leading-tight" > Scaffold-ETH 2</ span >
8667 </ div >
8768 </ Link >
88- < ul className = "hidden lg:flex lg:flex-nowrap menu menu-horizontal px-1 gap-2" >
69+ < ul className = "lg:flex lg:flex-nowrap menu menu-horizontal px-1 gap-2" >
8970 < HeaderMenuLinks />
9071 </ ul >
9172 </ div >
0 commit comments