35 lines
956 B
TypeScript
35 lines
956 B
TypeScript
import { serverClient } from "@/lib/trpc/server"
|
|
|
|
import { GiftIcon } from "@/components/Icons"
|
|
import Link from "@/components/TempDesignSystem/Link"
|
|
import { getIntl } from "@/i18n"
|
|
|
|
import LanguageSwitcher from "./LanguageSwitcher"
|
|
import Search from "./Search"
|
|
|
|
import styles from "./topMenu.module.css"
|
|
|
|
export default async function TopMenu() {
|
|
const intl = await getIntl()
|
|
const languages = await serverClient().contentstack.languageSwitcher.get()
|
|
|
|
if (!languages) {
|
|
return null
|
|
}
|
|
|
|
return (
|
|
<div className={styles.topMenu}>
|
|
<div className={styles.content}>
|
|
<Link variant="icon" color="burgundy" href="#" size="small">
|
|
<GiftIcon width={20} height={20} color="burgundy" />
|
|
{intl.formatMessage({ id: "Join Scandic Friends" })}
|
|
</Link>
|
|
<div className={styles.right}>
|
|
<LanguageSwitcher urls={languages.urls} />
|
|
<Search />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|