fix: sync current header with static-pages

This commit is contained in:
Christel Westerberg
2024-05-24 13:22:15 +02:00
parent 19d8b757cd
commit dd930688fc
22 changed files with 612 additions and 148 deletions

View File

@@ -1,33 +1,29 @@
import Desktop from "../LanguageSwitcher/Desktop"
import styles from "./topMenu.module.css"
import type { TopMenuProps } from "@/types/components/current/header/topMenu"
export default function TopMenu({ currentLanguage, frontpageLinkText, homeHref, links, urls }: TopMenuProps) {
export default function TopMenu({
frontpageLinkText,
homeHref,
links,
}: TopMenuProps) {
return (
<div className={styles.topMenu}>
<div className={styles.container}>
<a
className={styles.homeLink}
href={homeHref}
>
<a className={styles.homeLink} href={homeHref}>
{frontpageLinkText}
</a>
<ul className={styles.list}>
{urls ? (
{/* {languageSwitcher ? (
<li className="nav-secondary__item hidden-xxsmall hidden-xsmall hidden-small">
<Desktop currentLanguage={currentLanguage} urls={urls} />
{languageSwitcher}
</li>
) : null}
) : null} */}
{links.map(({ link }) => (
<li key={link.href}>
<a
className={styles.link}
href={link.href}
>
{links.map(({ link }, i) => (
<li key={link.href + i}>
<a className={styles.link} href={link.href}>
{link.title}
</a>
</li>