'use client';
import React, { useEffect, useState } from 'react';
import { Button, Image } from '@nextui-org/react';
import {
IoFileTrayFull,
IoHome,
IoInformationCircle,
IoLogoGithub,
IoMail,
IoPencil,
IoPricetags,
IoSearch
} from 'react-icons/io5';
import Link from 'next/link';
import ThemeSwitcher from '@/components/ThemeSwitcher';
const entries: { display_name: string; href: string; icon: React.ReactNode }[] = [
{
icon: ,
display_name: 'Home',
href: '/'
},
{
icon: ,
display_name: 'About',
href: '/about'
},
{
icon: ,
display_name: 'Blog',
href: '/blog'
},
{
icon: ,
display_name: 'Tags',
href: '/tags'
},
{
icon: ,
display_name: 'Archive',
href: '/Archive'
},
{
icon: ,
display_name: 'Search',
href: '/search'
}
];
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 Tao
Ad Astra
{
entries.map((meta, key) => (
-
))
}
>
);
}
export default Navbar;