30 lines
781 B
TypeScript
30 lines
781 B
TypeScript
import { usePathname } from 'next/navigation'
|
|
import { NavBar, NavLink } from './styles/navbar'
|
|
import StyleSelector from './themeselector';
|
|
|
|
const navLinks = [
|
|
{ name: "Home", href: "/" },
|
|
{ name: "About", href: "/about" },
|
|
{ name: "Games", href: "/games" },
|
|
{ name: "Services", href: "/services" }
|
|
]
|
|
|
|
const PageNavbar = () => {
|
|
const path = usePathname();
|
|
|
|
return (
|
|
<NavBar>
|
|
{navLinks.map((item) => (
|
|
<NavLink active={path == item.href ? true : false} key={item.name} href={item.href}>
|
|
{item.name}
|
|
</NavLink>
|
|
))}
|
|
<NavLink key="Mastodon_Verify" rel="me" href="https://mastodon.neshweb.net/@neshura">
|
|
Mastodon
|
|
</NavLink>
|
|
<StyleSelector></StyleSelector>
|
|
</NavBar>
|
|
);
|
|
}
|
|
|
|
export default PageNavbar; |