Files
web/components/Header/TopMenu/index.tsx
2024-09-06 09:00:07 +02:00

34 lines
1.0 KiB
TypeScript

import { GiftIcon, SearchIcon } from "@/components/Icons"
import LanguageSwitcher from "@/components/LanguageSwitcher"
import { getIntl } from "@/i18n"
import HeaderLink from "../HeaderLink"
import styles from "./topMenu.module.css"
import type { TopMenuProps } from "@/types/components/header/topMenu"
export default async function TopMenu({ languageUrls, topLink }: TopMenuProps) {
const intl = await getIntl()
return (
<div className={styles.topMenu}>
<div className={styles.content}>
{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" />
{intl.formatMessage({ id: "Find booking" })}
</HeaderLink>
</div>
</div>
</div>
)
}