feat: move my-pages view to overview

This commit is contained in:
Simon Emanuelsson
2024-04-11 18:51:38 +02:00
parent 43c872ad78
commit 752e8e11da
17 changed files with 62 additions and 54 deletions

View File

@@ -0,0 +1,26 @@
import { _ } from "@/lib/translation"
import { serverClient } from "@/lib/trpc/server"
import MaxWidth from "@/components/MaxWidth"
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 user = await serverClient().user.get()
return (
<MaxWidth className={styles.blocks} tag="main">
<Overview user={user} />
<UpcomingStays lang={params.lang} stays={user.stays} />
<Shortcuts
shortcuts={user.shortcuts}
subtitle={_("The community at your fingertips")}
title={_("Handy Shortcuts")}
/>
</MaxWidth>
)
}