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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user