feat: finish my pages overview page according to wireframe
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
import { serverClient } from "@/lib/trpc/server"
|
||||
|
||||
import { challenges, shortcuts, stays } from "./_constants"
|
||||
|
||||
import Challenges from "@/components/MyPages/Blocks/Challenges"
|
||||
import Overview from "@/components/MyPages/Blocks/Overview"
|
||||
import OverviewMobile from "@/components/MyPages/Blocks/Overview/Mobile"
|
||||
import Title from "@/components/MyPages/Title"
|
||||
import Shortcuts from "@/components/MyPages/Blocks/Shortcuts"
|
||||
import UpcomingStays from "@/components/MyPages/Blocks/UpcomingStays"
|
||||
|
||||
import styles from "./page.module.css"
|
||||
@@ -11,16 +13,24 @@ import type { LangParams, PageArgs } from "@/types/params"
|
||||
|
||||
export default async function MyPage({ params }: PageArgs<LangParams>) {
|
||||
const data = await serverClient().user.get()
|
||||
const user = {
|
||||
...data,
|
||||
journeys: challenges.journeys,
|
||||
membershipId: 30812404844732,
|
||||
nights: 14,
|
||||
points: 20720,
|
||||
qualifyingPoints: 5000,
|
||||
shortcuts,
|
||||
stays,
|
||||
victories: challenges.victories,
|
||||
}
|
||||
return (
|
||||
<section className={styles.container}>
|
||||
<header className={styles.header}>
|
||||
<Title uppercase>Good morning {data.name}</Title>
|
||||
</header>
|
||||
<section className={styles.blocks}>
|
||||
<Overview />
|
||||
<OverviewMobile />
|
||||
<UpcomingStays lang={params.lang} />
|
||||
</section>
|
||||
<section className={styles.blocks}>
|
||||
<Overview user={user} />
|
||||
<UpcomingStays lang={params.lang} stays={user.stays} />
|
||||
{/* Deals You Can't Miss - TBD */}
|
||||
<Challenges journeys={user.journeys} victories={user.victories} />
|
||||
<Shortcuts shortcuts={user.shortcuts} />
|
||||
</section>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user