mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2026-06-14 15:55:28 -04:00
next-mdx-remote v4 (#737)
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
import { memo } from "react";
|
||||
import Link from "next/link";
|
||||
import ThemeToggle from "../ThemeToggle/ThemeToggle";
|
||||
import { HomeIcon, NotesIcon, ProjectsIcon, ContactIcon } from "../Icons";
|
||||
|
||||
import styles from "./Menu.module.css";
|
||||
|
||||
const links = [
|
||||
{
|
||||
icon: <HomeIcon className={`icon ${styles.icon}`} />,
|
||||
text: "Home",
|
||||
href: "/",
|
||||
},
|
||||
{
|
||||
icon: <NotesIcon className={`icon ${styles.icon}`} />,
|
||||
text: "Notes",
|
||||
href: "/notes/",
|
||||
},
|
||||
{
|
||||
icon: <ProjectsIcon className={`icon ${styles.icon}`} />,
|
||||
text: "Projects",
|
||||
href: "/projects/",
|
||||
},
|
||||
{
|
||||
icon: <ContactIcon className={`icon ${styles.icon}`} />,
|
||||
text: "Contact",
|
||||
href: "/contact/",
|
||||
},
|
||||
];
|
||||
|
||||
const Menu = () => (
|
||||
<ul className={styles.menu}>
|
||||
{links.map((link, index) => (
|
||||
<li key={index}>
|
||||
<Link href={link.href} prefetch={false}>
|
||||
<a className={styles.link}>
|
||||
{link.icon} <span>{link.text}</span>
|
||||
</a>
|
||||
</Link>
|
||||
</li>
|
||||
))}
|
||||
|
||||
<li className={styles.theme_toggle}>
|
||||
<ThemeToggle className={styles.icon} />
|
||||
</li>
|
||||
</ul>
|
||||
);
|
||||
|
||||
export default memo(Menu);
|
||||
Reference in New Issue
Block a user