diff --git a/components/MyPages/AccountPage/Content.tsx b/components/MyPages/AccountPage/Content.tsx index aa73adceb..2074e79b9 100644 --- a/components/MyPages/AccountPage/Content.tsx +++ b/components/MyPages/AccountPage/Content.tsx @@ -2,7 +2,6 @@ import JsonToHtml from "@/components/JsonToHtml" import CurrentBenefitsBlock from "@/components/MyPages/Blocks/Benefits/CurrentLevel" import NextLevelBenefitsBlock from "@/components/MyPages/Blocks/Benefits/NextLevel" import Overview from "@/components/MyPages/Blocks/Overview" -import CurrentPointsBalance from "@/components/MyPages/Blocks/Points/CurrentPointsBalance" import EarnAndBurn from "@/components/MyPages/Blocks/Points/EarnAndBurn" import Shortcuts from "@/components/MyPages/Blocks/Shortcuts" import PreviousStays from "@/components/MyPages/Blocks/Stays/Previous" @@ -37,8 +36,6 @@ function DynamicComponent({ component, props }: AccountPageContentProps) { return case DynamicContentComponents.next_benefits: return - case DynamicContentComponents.my_points: - return case DynamicContentComponents.expiring_points: // TODO: Add once available // return diff --git a/components/MyPages/AccountPage/Webview/Content.tsx b/components/MyPages/AccountPage/Webview/Content.tsx index 45899a42f..cae5312f3 100644 --- a/components/MyPages/AccountPage/Webview/Content.tsx +++ b/components/MyPages/AccountPage/Webview/Content.tsx @@ -6,7 +6,6 @@ import { modWebviewLink } from "@/utils/webviews" import CurrentBenefitsBlock from "../../Blocks/Benefits/CurrentLevel" import NextLevelBenefitsBlock from "../../Blocks/Benefits/NextLevel" -import CurrentPointsBalance from "../../Blocks/Points/CurrentPointsBalance" import EarnAndBurn from "../../Blocks/Points/EarnAndBurn" import PointsOverview from "../../Blocks/Points/Overview" @@ -29,8 +28,6 @@ function DynamicComponent({ component, props }: AccountPageContentProps) { return case DynamicContentComponents.next_benefits: return - case DynamicContentComponents.my_points: - return case DynamicContentComponents.expiring_points: // TODO: Add once available // return diff --git a/components/MyPages/Blocks/Points/CurrentPointsBalance/currentPointsBalance.module.css b/components/MyPages/Blocks/Points/CurrentPointsBalance/currentPointsBalance.module.css deleted file mode 100644 index 45d8eaab7..000000000 --- a/components/MyPages/Blocks/Points/CurrentPointsBalance/currentPointsBalance.module.css +++ /dev/null @@ -1,20 +0,0 @@ -.card { - background-color: var(--Scandic-Brand-Pale-Peach); - border-radius: var(--Corner-radius-xLarge); - color: var(--Main-Brand-Burgundy); - display: flex; - flex-direction: column; - align-items: center; - gap: var(--Spacing-x2); -} - -.points { - font-size: var(--typography-Title-2-Mobile-fontSize); - margin: 0; -} - -@media screen and (min-width: 768px) { - .points { - font-size: var(--typography-Title-2-Desktop-fontSize); - } -} diff --git a/components/MyPages/Blocks/Points/CurrentPointsBalance/index.tsx b/components/MyPages/Blocks/Points/CurrentPointsBalance/index.tsx deleted file mode 100644 index d92caceef..000000000 --- a/components/MyPages/Blocks/Points/CurrentPointsBalance/index.tsx +++ /dev/null @@ -1,41 +0,0 @@ -import { serverClient } from "@/lib/trpc/server" - -import SectionContainer from "@/components/Section/Container" -import SectionHeader from "@/components/Section/Header" -import SectionLink from "@/components/Section/Link" -import { getIntl } from "@/i18n" -import { getMembership } from "@/utils/user" - -import styles from "./currentPointsBalance.module.css" - -import { AccountPageComponentProps } from "@/types/components/myPages/myPage/accountPage" - -async function CurrentPointsBalance({ - title, - subtitle, - link, -}: AccountPageComponentProps) { - const user = await serverClient().user.get() - const { formatMessage } = await getIntl() - if (!user) { - return null - } - const membership = getMembership(user.memberships) - return ( - - -
-

{`${formatMessage({ id: "Your points" })}*`}

-

- {`${formatMessage({ id: "Points" })}: ${membership ? membership.currentPoints : "N/A"}`} -

-

- {`*${formatMessage({ id: "Points may take up to 10 days to be displayed." })}`} -

-
- -
- ) -} - -export default CurrentPointsBalance