This is a test blog

'use client';
import { useState } from'react';importLinkfrom'next/link';import { usePathname } from'next/navigation';import { ModeToggle } from'./ModeToggle';import { Button } from'@/components/ui/button';import { Avatar } from'@/components/ui/avatar';
exportdefaultfunctionNavbar() {const [isMenuOpen, setIsMenuOpen] =useState(false);constpathname=usePathname();
constnavItems= [ { label:'Projects', href:'/projects' }, { label:'Books', href:'/books' }, { label:'Essays', href:'/essays' }, { label:'About', href:'/about' }, ];
consttoggleMenu= () => {setIsMenuOpen(!isMenuOpen); };
return (<navclassName="w-full flex items-center justify-between max-w-7xl mx-auto px-4 py-5"><div><Avatar/><LinkclassName="font-bold text-3xl"href={'/'}> harika<spanclassName="text-primary">.io</span></Link></div>
<divclassName="hidden md:flex flex-grow justify-center"><divclassName="flex gap-6">{navItems.map((item) => (<Linkkey={item.href}href={item.href}className={`hover:text-primary ${pathname === item.href ? 'text-primary' : ''}`}>{item.label}</Link> ))}</div></div><divclassName="hidden sm:flex gap-4 items-center"><ModeToggle/><Button>Contact</Button></div><divclassName="sm:hidden flex items-center"><ButtononClick={toggleMenu}className="focus:outline-none"><svgclassName="w-6 h-6"fill="none"stroke="currentColor"viewBox="0 0 24 24"xmlns="http://www.w3.org/2000/svg">{isMenuOpen ? (<pathstrokeLinecap="round"strokeLinejoin="round"strokeWidth="2"d="M6 18L18 6M6 6l12 12"/> ) : (<pathstrokeLinecap="round"strokeLinejoin="round"strokeWidth="2"d="M4 6h16M4 12h16m-7 6h7"/> )}</svg></Button></div>{isMenuOpen && (<divclassName="sm:hidden absolute top-16 left-0 w-full bg-white dark:bg-gray-800 shadow-lg"><divclassName="flex flex-col gap-4 p-4">{navItems.map((item) => (<Linkkey={item.href}href={item.href}className={`hover:text-primary ${pathname === item.href ? 'text-primary' : ''}`}onClick={() =>setIsMenuOpen(false)}>{item.label}</Link> ))}<divclassName="flex justify-center mt-4"><ModeToggle/></div><ButtonclassName="mt-4">Contact</Button></div></div> )}</nav> );}