feat(SW-186): implement cms data into new header

This commit is contained in:
Erik Tiekstra
2024-09-03 15:41:49 +02:00
parent bf7d22c728
commit 52fdc1daac
25 changed files with 123 additions and 154 deletions

View File

@@ -8,17 +8,19 @@ import styles from "./topMenu.module.css"
import type { TopMenuProps } from "@/types/components/header/topMenu"
export default async function TopMenu({ languageUrls }: TopMenuProps) {
export default async function TopMenu({ languageUrls, topLink }: TopMenuProps) {
const intl = await getIntl()
return (
<div className={styles.topMenu}>
<div className={styles.content}>
<HeaderLink href="#">
<GiftIcon width={20} height={20} color="burgundy" />
{intl.formatMessage({ id: "Join Scandic Friends" })}
</HeaderLink>
<div className={styles.right}>
{topLink ? (
<HeaderLink className={styles.topLink} href={topLink.href}>
<GiftIcon width={20} height={20} color="burgundy" />
{topLink.title}
</HeaderLink>
) : null}
<div className={styles.options}>
<LanguageSwitcher type="desktopHeader" urls={languageUrls} />
<HeaderLink href="#">
<SearchIcon width={20} height={20} color="burgundy" />