Files
web/apps/scandic-web/components/Blocks/DynamicContent/Points/Overview/index.tsx
Bianca Widstam 68c1b3dc50 Merged in chore/BOOK-708-replace-title-component (pull request #3414)
Chore/BOOK-708 replace title component

* chore(BOOK-708): replace title with typography

* chore(BOOK-708): replace title with typography

* chore(BOOK-708): remove Title from package.json


Approved-by: Linus Flood
Approved-by: Anton Gunnarsson
2026-01-12 07:54:59 +00:00

43 lines
1.1 KiB
TypeScript

import { getProfile } from "@/lib/trpc/memoizedRequests"
import LevelProgressCard from "@/components/MyPages/LevelProgressCard"
import { Section } from "@/components/Section"
import { SectionHeader } from "@/components/Section/Header"
import SectionLink from "@/components/Section/Link"
import PointsToSpendCard from "../PointsToSpendCard"
import styles from "./overview.module.css"
import type { AccountPageComponentProps } from "@/types/components/myPages/myPage/accountPage"
export default async function PointsOverview({
link,
subtitle,
title,
}: AccountPageComponentProps) {
const user = await getProfile()
if (!user || "error" in user) {
return null
}
return (
<Section>
<SectionHeader
link={link}
preamble={subtitle}
heading={title}
headingLevel="h1"
/>
<div className={styles.membershipCardsContainer}>
<PointsToSpendCard user={user} />
<LevelProgressCard
color="Surface/Brand/Primary 1/Default"
user={user}
/>
</div>
<SectionLink link={link} variant="mobile" />
</Section>
)
}