fix: add headers correctly

This commit is contained in:
Christel Westerberg
2024-05-22 14:02:52 +02:00
parent 158b5a5dbb
commit bac513ec4c
9 changed files with 158 additions and 57 deletions

View File

@@ -1,7 +1,6 @@
import { notFound } from "next/navigation"
import { serverClient } from "@/lib/trpc/server"
import BackButton from "@/components/BackButton"
import { Blocks } from "@/components/Loyalty/Blocks/WebView"
import Sidebar from "@/components/Loyalty/Sidebar"
import MaxWidth from "@/components/MaxWidth"
@@ -19,6 +18,7 @@ export default async function AboutScandicFriends({
{loyaltyPage.sidebar ? <Sidebar blocks={loyaltyPage.sidebar} /> : null}
<MaxWidth className={styles.blocks} tag="main">
<BackButton />
<Blocks blocks={loyaltyPage.blocks} lang={params.lang} />
</MaxWidth>
</section>

View File

@@ -1,11 +1,11 @@
import "@/app/globals.css"
import "@scandic-hotels/design-system/style.css"
import { notFound } from "next/navigation"
import { overview } from "@/constants/routes/myPages"
import { _ } from "@/lib/translation"
import { serverClient } from "@/lib/trpc/server"
import BackButton from "@/components/BackButton"
import MaxWidth from "@/components/MaxWidth"
import Content from "@/components/MyPages/AccountPage/Webview/Content"
@@ -16,8 +16,11 @@ import { LangParams, PageArgs } from "@/types/params"
export default async function MyPages({ params }: PageArgs<LangParams>) {
const accountPage = await serverClient().contentstack.accountPage.get()
const isNotOverviewPage = accountPage.url !== overview[params.lang]
return (
<MaxWidth className={styles.blocks} tag="main">
{isNotOverviewPage ? <BackButton /> : null}
<Content lang={params.lang} content={accountPage.content} />
</MaxWidth>
)