chore: cleanup

This commit is contained in:
Erik Tiekstra
2024-08-21 08:18:22 +02:00
parent c6ad5eecc5
commit 0dcb5a796a
32 changed files with 291 additions and 288 deletions
+6 -99
View File
@@ -5,32 +5,12 @@ import { serverClient } from "@/lib/trpc/server"
import Image from "@/components/Image"
import { getIntl } from "@/i18n"
import Menu from "./Menu"
import MyPages from "./MyPages"
import { navigationMenuItems } from "../tempHeaderData"
import MyPagesMenu from "./MyPagesMenu"
import NavigationMenu from "./NavigationMenu"
import styles from "./mainMenu.module.css"
export interface MenuItem {
id: string
title: string
href: string
children?: {
groupTitle: string
children: {
id: string
title: string
href: string
}[]
}[]
seeAllLinkText?: string
infoCard?: {
scriptedTitle: string
title: string
description: string
ctaLink: string
}
}
export default async function MainMenu() {
const intl = await getIntl()
const myPagesNavigation =
@@ -38,82 +18,9 @@ export default async function MainMenu() {
const user = await serverClient().user.name()
const menuItems: MenuItem[] = [
{
id: "hotels",
title: "Hotels",
href: "/hotels",
children: [],
},
{
id: "business",
title: "Business",
href: "/business",
children: [
{
groupTitle: "Top conference venues",
children: [
{
id: "stockholm",
title: "Stockholm",
href: "/stockholm",
},
{
id: "bergen",
title: "Bergen",
href: "/bergen",
},
{
id: "copenhagen",
title: "Copenhagen",
href: "/copenhagen",
},
],
},
{
groupTitle: "Scandic for business",
children: [
{
id: "book-a-venue",
title: "Book a venue",
href: "/book-a-venue",
},
{
id: "conference-packages",
title: "Conference packages",
href: "/conference-packages",
},
{
id: "co-working",
title: "Co-working",
href: "/co-working",
},
],
},
],
seeAllLinkText: "See all conference & meeting venues",
infoCard: {
scriptedTitle: "Stockholm",
title: "Meeting venues in Stockholm",
description:
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed et felis metus. Sed et felis metus.",
ctaLink: "/stockholm",
},
},
{
id: "offers",
title: "Offers",
href: "/offers",
},
{
id: "restaurants",
title: "Restaurants",
href: "/restaurants",
},
]
return (
<div className={styles.mainMenu}>
<nav className={styles.content}>
<nav className={styles.nav}>
<Link className={styles.logoLink} href="/">
<Image
alt={intl.formatMessage({ id: "Back to scandichotels.com" })}
@@ -126,8 +33,8 @@ export default async function MainMenu() {
width={113}
/>
</Link>
<Menu items={menuItems} />
<MyPages myPagesNavigation={myPagesNavigation} user={user} />
<NavigationMenu items={navigationMenuItems} />
<MyPagesMenu navigation={myPagesNavigation} user={user} />
</nav>
</div>
)