feat: add webview pages
This commit is contained in:
6
app/[lang]/webview/about-scandic-friends/page.module.css
Normal file
6
app/[lang]/webview/about-scandic-friends/page.module.css
Normal file
@@ -0,0 +1,6 @@
|
||||
.blocks {
|
||||
display: grid;
|
||||
gap: 4.2rem;
|
||||
padding-left: 2rem;
|
||||
padding-right: 2rem;
|
||||
}
|
||||
26
app/[lang]/webview/about-scandic-friends/page.tsx
Normal file
26
app/[lang]/webview/about-scandic-friends/page.tsx
Normal file
@@ -0,0 +1,26 @@
|
||||
import "@/app/globals.css"
|
||||
import "@scandic-hotels/design-system/style.css"
|
||||
|
||||
import { serverClient } from "@/lib/trpc/server"
|
||||
|
||||
import MaxWidth from "@/components/MaxWidth"
|
||||
import Content from "@/components/MyPages/AccountPage/Content"
|
||||
|
||||
import styles from "./page.module.css"
|
||||
|
||||
import type { LangParams, PageArgs, UriParams } from "@/types/params"
|
||||
|
||||
export default async function AboutScandicFriends({
|
||||
params,
|
||||
}: PageArgs<LangParams, UriParams>) {
|
||||
const accountPage = await serverClient().contentstack.accountPage.get({
|
||||
url: "/my-pages/overview",
|
||||
lang: params.lang,
|
||||
})
|
||||
|
||||
return (
|
||||
<MaxWidth className={styles.blocks} tag="main">
|
||||
<Content lang={params.lang} content={accountPage.content} />
|
||||
</MaxWidth>
|
||||
)
|
||||
}
|
||||
6
app/[lang]/webview/layout.module.css
Normal file
6
app/[lang]/webview/layout.module.css
Normal file
@@ -0,0 +1,6 @@
|
||||
.layout {
|
||||
padding-bottom: 7.7rem;
|
||||
font-family: var(--ff-fira-sans);
|
||||
|
||||
min-height: 100dvh;
|
||||
}
|
||||
@@ -1,3 +1,7 @@
|
||||
import { firaMono, firaSans } from "@/app/[lang]/(live)/fonts"
|
||||
|
||||
import styles from "./layout.module.css"
|
||||
|
||||
import type { Metadata } from "next"
|
||||
|
||||
import type { LangParams, LayoutArgs } from "@/types/params"
|
||||
@@ -12,7 +16,11 @@ export default function RootLayout({
|
||||
}: React.PropsWithChildren<LayoutArgs<LangParams>>) {
|
||||
return (
|
||||
<html lang={params.lang}>
|
||||
<body>{children}</body>
|
||||
<body
|
||||
className={`${firaMono.variable} ${firaSans.variable} ${styles.layout}`}
|
||||
>
|
||||
{children}
|
||||
</body>
|
||||
</html>
|
||||
)
|
||||
}
|
||||
|
||||
6
app/[lang]/webview/my-pages/benefits/benefits.module.css
Normal file
6
app/[lang]/webview/my-pages/benefits/benefits.module.css
Normal file
@@ -0,0 +1,6 @@
|
||||
.blocks {
|
||||
display: grid;
|
||||
gap: 4.2rem;
|
||||
padding-left: 2rem;
|
||||
padding-right: 2rem;
|
||||
}
|
||||
26
app/[lang]/webview/my-pages/benefits/page.tsx
Normal file
26
app/[lang]/webview/my-pages/benefits/page.tsx
Normal file
@@ -0,0 +1,26 @@
|
||||
import "@/app/globals.css"
|
||||
import "@scandic-hotels/design-system/style.css"
|
||||
|
||||
import { serverClient } from "@/lib/trpc/server"
|
||||
|
||||
import MaxWidth from "@/components/MaxWidth"
|
||||
import Content from "@/components/MyPages/AccountPage/Content"
|
||||
|
||||
import styles from "./benefits.module.css"
|
||||
|
||||
import type { LangParams, PageArgs, UriParams } from "@/types/params"
|
||||
|
||||
export default async function MyPages({
|
||||
params,
|
||||
}: PageArgs<LangParams, UriParams>) {
|
||||
const accountPage = await serverClient().contentstack.accountPage.get({
|
||||
url: "/my-pages/benefits",
|
||||
lang: params.lang,
|
||||
})
|
||||
|
||||
return (
|
||||
<MaxWidth className={styles.blocks} tag="main">
|
||||
<Content lang={params.lang} content={accountPage.content} />
|
||||
</MaxWidth>
|
||||
)
|
||||
}
|
||||
6
app/[lang]/webview/my-pages/overview/overview.module.css
Normal file
6
app/[lang]/webview/my-pages/overview/overview.module.css
Normal file
@@ -0,0 +1,6 @@
|
||||
.blocks {
|
||||
display: grid;
|
||||
gap: 4.2rem;
|
||||
padding-left: 2rem;
|
||||
padding-right: 2rem;
|
||||
}
|
||||
26
app/[lang]/webview/my-pages/overview/page.tsx
Normal file
26
app/[lang]/webview/my-pages/overview/page.tsx
Normal file
@@ -0,0 +1,26 @@
|
||||
import "@/app/globals.css"
|
||||
import "@scandic-hotels/design-system/style.css"
|
||||
|
||||
import { serverClient } from "@/lib/trpc/server"
|
||||
|
||||
import MaxWidth from "@/components/MaxWidth"
|
||||
import Content from "@/components/MyPages/AccountPage/Content"
|
||||
|
||||
import styles from "./overview.module.css"
|
||||
|
||||
import type { LangParams, PageArgs, UriParams } from "@/types/params"
|
||||
|
||||
export default async function MyPages({
|
||||
params,
|
||||
}: PageArgs<LangParams, UriParams>) {
|
||||
const accountPage = await serverClient().contentstack.accountPage.get({
|
||||
url: "/my-pages/overview",
|
||||
lang: params.lang,
|
||||
})
|
||||
|
||||
return (
|
||||
<MaxWidth className={styles.blocks} tag="main">
|
||||
<Content lang={params.lang} content={accountPage.content} />
|
||||
</MaxWidth>
|
||||
)
|
||||
}
|
||||
27
app/[lang]/webview/my-pages/points/page.tsx
Normal file
27
app/[lang]/webview/my-pages/points/page.tsx
Normal file
@@ -0,0 +1,27 @@
|
||||
import "@/app/globals.css"
|
||||
import "@scandic-hotels/design-system/style.css"
|
||||
|
||||
import { serverClient } from "@/lib/trpc/server"
|
||||
|
||||
import MaxWidth from "@/components/MaxWidth"
|
||||
import Content from "@/components/MyPages/AccountPage/Content"
|
||||
|
||||
import styles from "./points.module.css"
|
||||
|
||||
import type { LangParams, PageArgs, UriParams } from "@/types/params"
|
||||
|
||||
export default async function Points({
|
||||
params,
|
||||
}: PageArgs<LangParams, UriParams>) {
|
||||
// const accountPage = await serverClient().contentstack.accountPage.get({
|
||||
// url: "/my-pages/points",
|
||||
// lang: params.lang,
|
||||
// })
|
||||
|
||||
return (
|
||||
<MaxWidth className={styles.blocks} tag="main">
|
||||
<p>POINTS</p>
|
||||
{/* <Content lang={params.lang} content={accountPage.content} /> */}
|
||||
</MaxWidth>
|
||||
)
|
||||
}
|
||||
6
app/[lang]/webview/my-pages/points/points.module.css
Normal file
6
app/[lang]/webview/my-pages/points/points.module.css
Normal file
@@ -0,0 +1,6 @@
|
||||
.blocks {
|
||||
display: grid;
|
||||
gap: 4.2rem;
|
||||
padding-left: 2rem;
|
||||
padding-right: 2rem;
|
||||
}
|
||||
Reference in New Issue
Block a user