Files
web/components/MyPages/Blocks/Overview/index.tsx
2024-05-03 08:16:52 +02:00

31 lines
759 B
TypeScript

import { serverClient } from "@/lib/trpc/server"
import Title from "@/components/Title"
import Friend from "./Friend"
import Stats from "./Stats"
import styles from "./overview.module.css"
import type { OverviewProps } from "@/types/components/myPages/myPage/overview"
export default async function Overview({ title }: OverviewProps) {
const user = await serverClient().user.get()
return (
<section className={styles.container}>
<header>
{title && (
<Title as="h3" level="h2" uppercase className={styles.title}>
{title}
</Title>
)}
</header>
<section className={styles.overview}>
<Friend user={user} />
<Stats user={user} />
</section>
</section>
)
}