Merged in feature/refactor-lang (pull request #387)

feat: SW-238 Avoid prop drilling of lang

Approved-by: Michael Zetterberg
This commit is contained in:
Niclas Edenvin
2024-08-14 11:00:20 +00:00
parent 35128dbf44
commit e67212bd94
94 changed files with 378 additions and 322 deletions

View File

@@ -12,14 +12,12 @@ import Stats from "../../Overview/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 PointsOverview({
link,
subtitle,
title,
lang,
}: AccountPageComponentProps & LangParams) {
}: AccountPageComponentProps) {
const user = await serverClient().user.get()
if (!user || "error" in user) {
return null
@@ -31,7 +29,7 @@ export default async function PointsOverview({
<Hero color="burgundy">
<Friend user={user} color="red" />
<Divider className={styles.divider} color="peach" />
<Stats user={user} lang={lang} />
<Stats user={user} />
</Hero>
<SectionLink link={link} variant="mobile" />
</SectionContainer>