main-site/components/navbar.tsx
Neshura 21e613891e
Added styled-components + various
Includes changes due to NextJS version bump and attempts at storing theme via cookie
2022-12-14 19:35:27 +01:00

27 lines
769 B
TypeScript

import styles from '/styles/Home.module.css'
import Link from 'next/link'
import { usePathname } from 'next/navigation'
const navLinks = [
{ name: "Home", href: "/" },
{ name: "About", href: "/about" },
{ name: "Games", href: "/games" },
{ name: "Services", href: "/services" }
]
const Navbar = () => {
const path = usePathname();
return (
<nav className={styles.navbar}>
{navLinks.map((item, index) => (
<Link className={path == item.href ? styles.navelem_active : styles.navelem} key={item.name} href={item.href}>
{item.name}
</Link>
))}
<Link className={styles.navelem} key="Mastodon_Verify" rel="me" href="https://mastodon.neshweb.net/@neshura">Mastodon</Link>
</nav>
);
}
export default Navbar;