fix: loyalty levels fetch in rsc for mobile menu
fix: get loyalty level in rsc fix: typo
This commit is contained in:
@@ -2,9 +2,7 @@
|
||||
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { MembershipLevelEnum } from "@/constants/membershipLevels"
|
||||
import { logout } from "@/constants/routes/handleAuth"
|
||||
import { trpc } from "@/lib/trpc/client"
|
||||
|
||||
import { ArrowRightIcon } from "@/components/Icons"
|
||||
import Divider from "@/components/TempDesignSystem/Divider"
|
||||
@@ -23,18 +21,12 @@ export default function MyPagesMenuContent({
|
||||
navigation,
|
||||
toggleOpenStateFn,
|
||||
user,
|
||||
membershipLevel,
|
||||
}: MyPagesMenuContentProps) {
|
||||
const intl = useIntl()
|
||||
const lang = useLang()
|
||||
const myPagesMenuContentRef = useTrapFocus()
|
||||
|
||||
const membershipLevel = trpc.contentstack.loyaltyLevels.byLevel.useQuery(
|
||||
{
|
||||
level: MembershipLevelEnum[membership?.membershipLevel!],
|
||||
},
|
||||
{ enabled: !!membership?.membershipLevel }
|
||||
).data
|
||||
|
||||
const membershipPoints = membership?.currentPoints
|
||||
const introClassName =
|
||||
membershipLevel && membershipPoints
|
||||
|
||||
Reference in New Issue
Block a user