1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2026-04-21 12:05:30 -04:00

re-add next-remote-watch as local dev server

This commit is contained in:
2022-02-16 14:25:27 -05:00
parent 416eb4b4cf
commit 147128516e
6 changed files with 550 additions and 119 deletions
+4 -4
View File
@@ -1,8 +1,8 @@
import { memo } from "react";
import { useRouter } from "next/router";
import classNames from "classnames";
import MenuLink from "../MenuLink/MenuLink";
import { menuLinks } from "../../lib/config/menu";
import MenuItem from "../MenuItem/MenuItem";
import { menuItems } from "../../lib/config/menu";
import styles from "./Menu.module.css";
@@ -15,10 +15,10 @@ const Menu = ({ className }: MenuProps) => {
return (
<ul className={classNames(styles.menu, className)}>
{menuLinks.map((link, index) => (
{menuItems.map((item, index) => (
<li key={index} className={styles.item}>
{/* kinda weird/hacky way to determine if the *first part* of the current path matches this href */}
<MenuLink {...link} current={link.href === `/${router.pathname.split("/")[1]}`} />
<MenuItem {...item} current={item.href === `/${router.pathname.split("/")[1]}`} />
</li>
))}
</ul>