Files
web/components/MyPages/Blocks/Overview/index.tsx
Tobias Johansson bc3233ff64 Merged in feat/SW-196-design-fixes (pull request #547)
Feat/SW-196 design fixes

* feat(SW-196): Updated copy My credit cards -> My payment cards

* fix: update design system version

* feat(SW-196): Update Header component to use Preamble instead of Subtitle

* feat(SW-196): Minor design fixes


Approved-by: Christel Westerberg
2024-09-03 08:43:13 +00:00

39 lines
1.1 KiB
TypeScript

import { serverClient } from "@/lib/trpc/server"
import SectionContainer from "@/components/Section/Container"
import SectionHeader from "@/components/Section/Header"
import SectionLink from "@/components/Section/Link"
import Divider from "@/components/TempDesignSystem/Divider"
import { getLang } from "@/i18n/serverContext"
import Hero from "./Friend/Hero"
import Friend from "./Friend"
import Stats from "./Stats"
import styles from "./overview.module.css"
import type { AccountPageComponentProps } from "@/types/components/myPages/myPage/accountPage"
export default async function Overview({
link,
subtitle,
title,
}: AccountPageComponentProps) {
const user = await serverClient().user.get()
if (!user || "error" in user) {
return null
}
return (
<SectionContainer>
<SectionHeader link={link} preamble={subtitle} title={title} topTitle />
<Hero color="red">
<Friend user={user} color="burgundy" />
<Divider className={styles.divider} color="peach" />
<Stats user={user} />
</Hero>
<SectionLink link={link} variant="mobile" />
</SectionContainer>
)
}