88 TableOfContentsIcon ,
99} from "lucide-react" ;
1010import Link from "next/link" ;
11- import { usePathname , useRouter } from "next/navigation" ;
11+ import { usePathname } from "next/navigation" ;
1212import { useState } from "react" ;
1313import { DocSearch } from "@/components/others/DocSearch" ;
1414import { Button } from "@/components/ui/button" ;
@@ -191,13 +191,12 @@ const supportLinks = [
191191
192192export function Header ( ) {
193193 const [ showBurgerMenu , setShowBurgerMenu ] = useState ( false ) ;
194- const router = useRouter ( ) ;
195194 const pathname = usePathname ( ) ;
196195
197196 return (
198- < header className = "flex w-full flex-col gap-2 border-b bg-background pt-4 px-4 lg:px-8 overflow-hidden" >
197+ < header className = "flex w-full flex-col gap-2 border-b bg-background pt-4 px-4 pb-4 xl:pb-0 lg:px-8 overflow-hidden" >
198+ { /* Top row */ }
199199 < div className = "container flex items-center justify-between gap-6" >
200- { /* Top row */ }
201200 < div className = "flex items-center gap-2" >
202201 < Link
203202 aria-label = "thirdweb Docs"
@@ -219,7 +218,7 @@ export function Header() {
219218 href = "https://github.com/thirdweb-dev"
220219 target = "_blank"
221220 >
222- < GithubIcon className = "mx-3 size-6 " />
221+ < GithubIcon className = "size-6 lg: size-5 " />
223222 </ Link >
224223 </ div >
225224
@@ -232,25 +231,21 @@ export function Header() {
232231 </ div >
233232
234233 < div className = "hidden xl:block" >
235- < Button
236- onClick = { ( ) => {
237- router . push ( "/chat" ) ;
238- } }
239- >
240- < MessageCircleIcon className = "mr-2 size-4" />
241- Ask AI
234+ < Button asChild >
235+ < Link href = "/chat" >
236+ < MessageCircleIcon className = "mr-2 size-4" />
237+ Ask AI
238+ </ Link >
242239 </ Button >
243240 </ div >
244241
245242 < div className = "flex items-center gap-1 xl:hidden" >
246243 < ThemeSwitcher className = "border-none bg-transparent" />
247244 < DocSearch variant = "icon" />
248- < Button
249- className = "p-2"
250- onClick = { ( ) => router . push ( "/chat" ) }
251- variant = "ghost"
252- >
253- < MessageCircleIcon className = "size-7" />
245+ < Button className = "p-2" asChild variant = "ghost" >
246+ < Link href = "/chat" >
247+ < MessageCircleIcon className = "size-6" />
248+ </ Link >
254249 </ Button >
255250 < Button
256251 className = "p-2"
@@ -264,13 +259,13 @@ export function Header() {
264259 </ div >
265260
266261 { /* Bottom row - hidden on mobile */ }
267- < div className = "container hidden items-center justify-between gap-6 xl:flex" >
262+ < div className = "container hidden items-center justify-between gap-6 xl:flex mt-1 " >
268263 < nav className = "flex grow gap-5" >
269- < ul className = "flex flex-row items-center gap-5 " >
264+ < ul className = "flex flex-row items-center gap-0 mb-1 " >
270265 { links . map ( ( link ) => {
271266 return (
272267 < li
273- className = "flex items-center py-4 relative overflow-hidden "
268+ className = "flex items-center py-2 relative px-2.5 rounded-lg hover:bg-accent hover:text-foreground "
274269 key = { link . href }
275270 onClick = { ( ) => {
276271 setShowBurgerMenu ( false ) ;
@@ -281,7 +276,7 @@ export function Header() {
281276 >
282277 < NavLink href = { link . href } name = { link . name } />
283278 { pathname . includes ( link . href ) && (
284- < div className = "bg-violet-700 h-1 inset-x-0.5 rounded-full absolute -bottom-0.5 " />
279+ < div className = "bg-violet-700 h-[2px] inset-x-0 rounded-full absolute -bottom-1 " />
285280 ) }
286281 </ li >
287282 ) ;
0 commit comments