fix(SW-556): add membership number, remove some unused code

This commit is contained in:
Christian Andolf
2024-10-16 16:37:09 +02:00
parent e5b4b6f82e
commit 95d0a70f5e
6 changed files with 26 additions and 10 deletions

View File

@@ -1,3 +1,4 @@
import { getProfile } from "@/lib/trpc/memoizedRequests"
import { serverClient } from "@/lib/trpc/server"
import SectionContainer from "@/components/Section/Container"
@@ -22,10 +23,19 @@ export default async function CurrentRewardsBlock({
return null
}
const user = await getProfile()
if (!user || "error" in user) {
return null
}
return (
<SectionContainer>
<SectionHeader title={title} link={link} preamble={subtitle} />
<ClientCurrentRewards initialCurrentRewards={initialCurrentRewards} />
<ClientCurrentRewards
initialCurrentRewards={initialCurrentRewards}
membershipNumber={user.membership?.membershipNumber}
/>
<SectionLink link={link} variant="mobile" />
</SectionContainer>
)