Utilizing memoized requests

This commit is contained in:
Linus Flood
2024-10-25 15:33:06 +02:00
parent 4a8d38912f
commit 687a110a39
13 changed files with 123 additions and 91 deletions

View File

@@ -1,6 +1,7 @@
import { Lock } from "react-feather"
import { MembershipLevelEnum } from "@/constants/membershipLevels"
import { getMembershipLevel } from "@/lib/trpc/memoizedRequests"
import { serverClient } from "@/lib/trpc/server"
import SectionContainer from "@/components/Section/Container"
@@ -22,7 +23,7 @@ export default async function NextLevelRewardsBlock({
link,
}: AccountPageComponentProps) {
const intl = await getIntl()
const membershipLevel = await serverClient().user.membershipLevel()
const membershipLevel = await getMembershipLevel()
if (!membershipLevel || !membershipLevel?.nextLevel) {
return null