feat(WEB-93): add Header to CMS and render it in Next

This commit is contained in:
Simon Emanuelsson
2024-02-20 09:07:17 +01:00
parent 58b82cc8b7
commit cbb53df67c
30 changed files with 612 additions and 53 deletions

View File

@@ -0,0 +1,41 @@
// import Desktop from "../LanguageSwitcher/Desktop"
import Link from "next/link"
import styles from "./topMenu.module.css"
import type { TopMenuProps } from "@/types/components/current/header/topMenu"
/**
* Desktop is commented out as it relates to
* LanguageSwitcher and will be handled in another task
*/
export default function TopMenu({ frontpageLinkText, homeHref, links }: TopMenuProps) {
return (
<div className={styles.topMenu}>
<div className={styles.container}>
<Link
className={styles.homeLink}
href={homeHref}
>
{frontpageLinkText}
</Link>
<ul className={styles.list}>
{/* <li className="nav-secondary__item hidden-xxsmall hidden-xsmall hidden-small">
{links ? <Desktop currentLanguage={currentLanguage} links={links} /> : null}
</li> */}
{links.map(({ link }) => (
<li key={link.href}>
<Link
className={styles.link}
href={link.href}
>
{link.title}
</Link>
</li>
))}
</ul>
</div>
</div>
)
}