feat: add mapping of benefits AccountPage
This commit is contained in:
@@ -1,39 +1,21 @@
|
||||
import CurrentBenefitsBlock from "@/components/MyPages/Blocks/Benefits/CurrentLevel"
|
||||
import NextLevelBenefitsBlock from "@/components/MyPages/Blocks/Benefits/NextLevel"
|
||||
import Shortcuts from "@/components/MyPages/Blocks/Shortcuts"
|
||||
import Title from "@/components/Title"
|
||||
import { serverClient } from "@/lib/trpc/server"
|
||||
|
||||
import { shortcuts } from "./_constants"
|
||||
import Content from "@/components/MyPages/AccountPage/Content"
|
||||
|
||||
import styles from "./page.module.css"
|
||||
|
||||
import type { LangParams, PageArgs } from "@/types/params"
|
||||
|
||||
export default function BenefitsPage({ params }: PageArgs<LangParams>) {
|
||||
export default async function BenefitsPage({ params }: PageArgs<LangParams>) {
|
||||
const user = await serverClient().user.get()
|
||||
const accountPage = await serverClient().contentstack.accountPage.get({
|
||||
lang: params.lang,
|
||||
uri: "/my-pages/benefits",
|
||||
})
|
||||
|
||||
return (
|
||||
<main className={styles.container}>
|
||||
<header className={styles.header}>
|
||||
<Title as="h3" className={styles.title} uppercase>
|
||||
Your Perks and benefits. Tailored just for{" "}
|
||||
<span className={styles.red}>you.</span>
|
||||
</Title>
|
||||
<p className={styles.preamble}>
|
||||
Discover the exclusive benefits and delightful surprises our
|
||||
friendship unlocks.
|
||||
</p>
|
||||
</header>
|
||||
<CurrentBenefitsBlock />
|
||||
<Shortcuts
|
||||
shortcuts={shortcuts}
|
||||
title={
|
||||
<span className={styles.title}>
|
||||
Perks and benefits{" "}
|
||||
<span className={styles.red}>for All friends.</span>
|
||||
</span>
|
||||
}
|
||||
subtitle="Always Yours. Universal Benefits for the Scandic Friends community."
|
||||
/>
|
||||
<NextLevelBenefitsBlock />
|
||||
<Content user={user} lang={params.lang} content={accountPage.content} />
|
||||
</main>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user