feat(SW-184): added language switcher

This commit is contained in:
Erik Tiekstra
2024-08-20 14:51:47 +02:00
parent 45095a27d4
commit b37cc7a34c
11 changed files with 133 additions and 37 deletions

View File

@@ -1,3 +1,5 @@
import { serverClient } from "@/lib/trpc/server"
import { GiftIcon } from "@/components/Icons"
import Link from "@/components/TempDesignSystem/Link"
@@ -7,6 +9,12 @@ import Search from "./Search"
import styles from "./topMenu.module.css"
export default async function TopMenu() {
const languages = await serverClient().contentstack.languageSwitcher.get()
if (!languages) {
return null
}
return (
<div className={styles.topMenu}>
<div className={styles.content}>
@@ -15,7 +23,7 @@ export default async function TopMenu() {
Join Scandic Friends
</Link>
<div className={styles.right}>
<LanguageSwitcher />
<LanguageSwitcher urls={languages.urls} />
<Search />
</div>
</div>