21e613891e
Includes changes due to NextJS version bump and attempts at storing theme via cookie
27 lines
769 B
TypeScript
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; |