implement logic to select compared levels based on membershipLevel
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
import { get } from "http"
|
||||
|
||||
import { serverClient } from "@/lib/trpc/server"
|
||||
|
||||
import Header from "@/components/MyPages/Blocks/Header"
|
||||
import { getIntl } from "@/i18n"
|
||||
import { getMembership } from "@/utils/user"
|
||||
|
||||
import styles from "./currentPointsBalance.module.css"
|
||||
|
||||
@@ -15,6 +18,7 @@ async function CurrentPointsBalance({
|
||||
}: AccountPageComponentProps) {
|
||||
const user = await serverClient().user.get()
|
||||
const { formatMessage } = await getIntl()
|
||||
const membership = getMembership(user.memberships)
|
||||
return (
|
||||
<div>
|
||||
<Header title={title} link={link} subtitle={subtitle} />
|
||||
@@ -23,7 +27,7 @@ async function CurrentPointsBalance({
|
||||
<h2>{`${formatMessage({ id: "Total points" })}*`}</h2>
|
||||
<p
|
||||
className={styles.points}
|
||||
>{`${formatMessage({ id: "Points" })}: ${user.membership?.currentPoints || "N/A"}`}</p>
|
||||
>{`${formatMessage({ id: "Points" })}: ${membership?.currentPoints || "N/A"}`}</p>
|
||||
<p className={styles.disclaimer}>
|
||||
{`*${formatMessage({ id: "Points may take up to 10 days to be displayed." })}`}
|
||||
</p>
|
||||
|
||||
Reference in New Issue
Block a user