42 lines
1.2 KiB
TypeScript
42 lines
1.2 KiB
TypeScript
import Link from "next/link"
|
|
|
|
import { serverClient } from "@/lib/trpc/server"
|
|
|
|
import Image from "@/components/Image"
|
|
import { getIntl } from "@/i18n"
|
|
|
|
import { navigationMenuItems } from "../tempHeaderData"
|
|
import MyPagesMenu from "./MyPagesMenu"
|
|
import NavigationMenu from "./NavigationMenu"
|
|
|
|
import styles from "./mainMenu.module.css"
|
|
|
|
export default async function MainMenu() {
|
|
const intl = await getIntl()
|
|
const myPagesNavigation =
|
|
await serverClient().contentstack.myPages.navigation.get()
|
|
|
|
const user = await serverClient().user.name()
|
|
|
|
return (
|
|
<div className={styles.mainMenu}>
|
|
<nav className={styles.nav}>
|
|
<Link className={styles.logoLink} href="/">
|
|
<Image
|
|
alt={intl.formatMessage({ id: "Back to scandichotels.com" })}
|
|
className={styles.logo}
|
|
data-js="scandiclogoimg"
|
|
data-nosvgsrc="/_static/img/scandic-logotype.png"
|
|
itemProp="logo"
|
|
height={24}
|
|
src="/_static/img/scandic-logotype.svg"
|
|
width={113}
|
|
/>
|
|
</Link>
|
|
<NavigationMenu items={navigationMenuItems} />
|
|
<MyPagesMenu navigation={myPagesNavigation} user={user} />
|
|
</nav>
|
|
</div>
|
|
)
|
|
}
|