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,5 +1,6 @@
import { MembershipLevelEnum } from "@/constants/membershipLevels"
import { myPages } from "@/constants/routes/myPages"
import { getMembershipLevelSafely, getName } from "@/lib/trpc/memoizedRequests"
import { serverClient } from "@/lib/trpc/server"
import Link from "@/components/TempDesignSystem/Link"
@@ -17,8 +18,8 @@ export default async function MyPagesMenuWrapper() {
const [intl, myPagesNavigation, user, membership] = await Promise.all([
getIntl(),
serverClient().contentstack.myPages.navigation.get(),
serverClient().user.name(),
serverClient().user.safeMembershipLevel(),
getName(),
getMembershipLevelSafely(),
])
const membershipLevel = membership?.membershipLevel