'use client'; import React, { useEffect, useState } from 'react'; import { Navbar as NextUINavbar, NavbarBrand, NavbarContent, NavbarItem, NavbarMenu, NavbarMenuItem, NavbarMenuToggle } from '@nextui-org/react'; import Link from 'next/link'; import { usePathname } from 'next/navigation'; import ThemeSwitcher from '@/components/ThemeSwitcher'; const entries: { display_name: string; href: string; }[] = [ { display_name: 'Home', href: '/' }, { display_name: 'About', href: '/about' }, { display_name: 'Blog', href: '/blog' } ]; function Navbar() { const [ scrolled, setScrolled ] = useState(false); useEffect(() => { const handleScroll = () => { const isScrolled = window.scrollY > 0; setScrolled(isScrolled); }; window.addEventListener('scroll', handleScroll); return () => { window.removeEventListener('scroll', handleScroll); }; }, []); return ( <>

{ 'Lumither\'s site' }

{ 'Lumither\'s site' }

{ entries.map((item, index) => ( // eslint-disable-next-line react-hooks/rules-of-hooks { item.display_name } )) }
{ entries.map((item, index) => ( { item.display_name } )) }
); } export default Navbar;