feat(SW-66, SW-348): search functionality and ui

This commit is contained in:
Simon Emanuelsson
2024-08-28 10:47:57 +02:00
parent b9dbcf7d90
commit af850c90e7
437 changed files with 7663 additions and 9881 deletions

View File

@@ -0,0 +1,37 @@
import "@/app/globals.css"
import "@scandic-hotels/design-system/style.css"
import { overview } from "@/constants/routes/webviews"
import { serverClient } from "@/lib/trpc/server"
import MaxWidth from "@/components/MaxWidth"
import TrackingSDK from "@/components/TrackingSDK"
import Blocks from "@/components/Webviews/AccountPage/Blocks"
import LinkToOverview from "@/components/Webviews/LinkToOverview"
import { getLang } from "@/i18n/serverContext"
import styles from "./accountPage.module.css"
export default async function AccountPage() {
const accountPageRes = await serverClient().contentstack.accountPage.get()
if (!accountPageRes) {
return null
}
const { tracking, accountPage } = accountPageRes
const linkToOverview =
`/${getLang()}/webview${accountPage.url}` !== overview[getLang()]
return (
<>
<MaxWidth className={styles.blocks} tag="main">
{linkToOverview ? <LinkToOverview /> : null}
<Blocks content={accountPage.content} />
</MaxWidth>
<TrackingSDK pageData={tracking} />
</>
)
}