mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2026-09-16 04:35:33 -04:00
consistent use of arrow functions/default exports
This commit is contained in:
@@ -4,7 +4,7 @@ import { HomeIcon, NotesIcon, ProjectsIcon, ContactIcon } from "../icons";
|
||||
|
||||
import styles from "./Menu.module.scss";
|
||||
|
||||
const menuItems = [
|
||||
const links = [
|
||||
{
|
||||
icon: <HomeIcon className={`icon ${styles.icon}`} />,
|
||||
text: "Home",
|
||||
@@ -30,21 +30,21 @@ const menuItems = [
|
||||
// ensure the theme toggle isn't evaluated server-side
|
||||
const ThemeToggle = dynamic(() => import("./ThemeToggle"), { ssr: false });
|
||||
|
||||
export default function Menu() {
|
||||
return (
|
||||
<ul className={styles.menu}>
|
||||
{menuItems.map((item, index) => (
|
||||
<li key={index} className={styles.item}>
|
||||
<Link href={item.href} prefetch={false}>
|
||||
<a className={styles.link}>
|
||||
{item.icon} <span className={styles.text}>{item.text}</span>
|
||||
</a>
|
||||
</Link>
|
||||
</li>
|
||||
))}
|
||||
<li className={`${styles.item} ${styles.theme_toggle}`}>
|
||||
<ThemeToggle className={styles.icon} />
|
||||
const Menu = () => (
|
||||
<ul className={styles.menu}>
|
||||
{links.map((link, index) => (
|
||||
<li key={index} className={styles.item}>
|
||||
<Link href={link.href} prefetch={false}>
|
||||
<a className={styles.link}>
|
||||
{link.icon} <span className={styles.text}>{link.text}</span>
|
||||
</a>
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
);
|
||||
}
|
||||
))}
|
||||
<li className={`${styles.item} ${styles.theme_toggle}`}>
|
||||
<ThemeToggle className={styles.icon} />
|
||||
</li>
|
||||
</ul>
|
||||
);
|
||||
|
||||
export default Menu;
|
||||
|
||||
Reference in New Issue
Block a user