refactor(starter): upgrade to new version of gatsby

This commit is contained in:
Alexander Shelepenok
2022-01-09 20:12:31 +00:00
parent 84bdc5899d
commit 67ebabbaac
397 changed files with 26665 additions and 34984 deletions

View File

@@ -0,0 +1,32 @@
import React from "react";
import { Link } from "gatsby";
import styles from "./Menu.module.scss";
type Props = {
menu: {
label: string;
path: string;
}[];
};
const Menu: React.FC<Props> = ({ menu }: Props) => (
<nav className={styles.menu}>
<ul className={styles.menu__list}>
{menu.map(item => (
<li className={styles["menu__list-item"]} key={item.path}>
<Link
to={item.path}
className={styles["menu__list-item-link"]}
activeClassName={styles["menu__list-item-link--active"]}
>
{item.label}
</Link>
</li>
))}
</ul>
</nav>
);
export default Menu;