diff --git a/components/MyPages/Blocks/Overview/Stats/Points/PointsColumn/index.tsx b/components/MyPages/Blocks/Overview/Stats/Points/PointsColumn/index.tsx index 6ae2d39cd..528ec9ee2 100644 --- a/components/MyPages/Blocks/Overview/Stats/Points/PointsColumn/index.tsx +++ b/components/MyPages/Blocks/Overview/Stats/Points/PointsColumn/index.tsx @@ -39,12 +39,13 @@ export const StayOnLevelColumn = ({ points, subtitleParam }: PointsColumn) => export const NextLevelNightsColumn = ({ nights, subtitleParam, + subtitle = "by", }: NightsColumn) => PointsColumn({ nights, title: "Nights needed to level up", subtitleParam, - subtitle: "by", + subtitle, }) async function PointsColumn({ @@ -72,7 +73,7 @@ async function PointsColumn({ {points ?? nights ?? "N/A"}
- {formatMessage({ id: subtitle })} {subtitleParam} + {subtitle ? formatMessage({ id: subtitle }) : ""} {subtitleParam} ) diff --git a/components/MyPages/Blocks/Overview/Stats/Points/index.tsx b/components/MyPages/Blocks/Overview/Stats/Points/index.tsx index d25a77ef1..88b8db06c 100644 --- a/components/MyPages/Blocks/Overview/Stats/Points/index.tsx +++ b/components/MyPages/Blocks/Overview/Stats/Points/index.tsx @@ -5,7 +5,11 @@ import { getMembershipLevelObject } from "@/utils/membershipLevel" import { getMembership } from "@/utils/user" import PointsContainer from "./Container" -import { NextLevelPointsColumn, YourPointsColumn } from "./PointsColumn" +import { + NextLevelNightsColumn, + NextLevelPointsColumn, + YourPointsColumn, +} from "./PointsColumn" import { UserProps } from "@/types/components/myPages/user" @@ -25,6 +29,13 @@ export default async function Points({ user }: UserProps) { subtitleParam={nextLevel.name} /> )} + {membership?.nightsToTopTier && ( +