Files
web/components/Current/Header/TopMenu/index.tsx
2024-02-22 16:32:59 +01:00

42 lines
1.1 KiB
TypeScript

// 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>
)
}