Files
web/components/MyPages/Blocks/Overview/index.tsx
Christel Westerberg 4233ecae42 fix: update ui
2024-06-19 16:15:33 +02:00

36 lines
1006 B
TypeScript

import { serverClient } from "@/lib/trpc/server"
import SectionContainer from "@/components/Section/Container"
import Header from "@/components/Section/Header"
import Divider from "@/components/TempDesignSystem/Divider"
import Friend from "./Friend"
import Stats from "./Stats"
import styles from "./overview.module.css"
import type { AccountPageComponentProps } from "@/types/components/myPages/myPage/accountPage"
import type { LangParams } from "@/types/params"
export default async function Overview({
link,
subtitle,
title,
lang,
}: AccountPageComponentProps & LangParams) {
const user = await serverClient().user.get()
if (!user) {
return null
}
return (
<SectionContainer>
<Header link={link} subtitle={subtitle} title={title} topTitle />
<section className={styles.overview}>
<Friend user={user} />
<Divider className={styles.divider} color="peach" />
<Stats user={user} lang={lang} />
</section>
</SectionContainer>
)
}