fix: add link to overview
This commit is contained in:
@@ -3,4 +3,5 @@
|
||||
gap: 4.2rem;
|
||||
padding-left: 2rem;
|
||||
padding-right: 2rem;
|
||||
padding-top: 2rem;
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
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"
|
||||
import LinkToOverview from "@/components/Webviews/LinkToOverview"
|
||||
|
||||
import styles from "./page.module.css"
|
||||
|
||||
@@ -15,10 +15,9 @@ export default async function AboutScandicFriends({
|
||||
const loyaltyPage = await serverClient().contentstack.loyaltyPage.get()
|
||||
return (
|
||||
<section className={styles.content}>
|
||||
<LinkToOverview lang={params.lang} />
|
||||
{loyaltyPage.sidebar ? <Sidebar blocks={loyaltyPage.sidebar} /> : null}
|
||||
|
||||
<MaxWidth className={styles.blocks} tag="main">
|
||||
<BackButton />
|
||||
<Blocks blocks={loyaltyPage.blocks} lang={params.lang} />
|
||||
</MaxWidth>
|
||||
</section>
|
||||
|
||||
@@ -3,4 +3,5 @@
|
||||
gap: 4.2rem;
|
||||
padding-left: 2rem;
|
||||
padding-right: 2rem;
|
||||
padding-top: 2rem;
|
||||
}
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
import "@/app/globals.css"
|
||||
import "@scandic-hotels/design-system/style.css"
|
||||
|
||||
import { overview } from "@/constants/routes/myPages"
|
||||
import { _ } from "@/lib/translation"
|
||||
import { overview } from "@/constants/routes/webviews"
|
||||
import { serverClient } from "@/lib/trpc/server"
|
||||
|
||||
import BackButton from "@/components/BackButton"
|
||||
import MaxWidth from "@/components/MaxWidth"
|
||||
import Content from "@/components/MyPages/AccountPage/Webview/Content"
|
||||
import LinkToOverview from "@/components/Webviews/LinkToOverview"
|
||||
|
||||
import styles from "./page.module.css"
|
||||
|
||||
@@ -16,11 +15,12 @@ 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]
|
||||
const linkToOverview =
|
||||
`/${params.lang}/webview${accountPage.url}` !== overview[params.lang]
|
||||
|
||||
return (
|
||||
<MaxWidth className={styles.blocks} tag="main">
|
||||
{isNotOverviewPage ? <BackButton /> : null}
|
||||
{linkToOverview ? <LinkToOverview lang={params.lang} /> : null}
|
||||
<Content lang={params.lang} content={accountPage.content} />
|
||||
</MaxWidth>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user