Files
web/app/[lang]/(live)/(protected)/my-pages/page.tsx
2024-04-02 13:43:23 +02:00

37 lines
1.1 KiB
TypeScript

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 Shortcuts from "@/components/MyPages/Blocks/Shortcuts"
import UpcomingStays from "@/components/MyPages/Blocks/UpcomingStays"
import styles from "./page.module.css"
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.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>
)
}