feat(WEB-93): add Header to CMS and render it in Next
This commit is contained in:
41
components/Current/Header/TopMenu/index.tsx
Normal file
41
components/Current/Header/TopMenu/index.tsx
Normal 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>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user