From 66da53925ebb44767f0efccd2dab3c45c8e64d65 Mon Sep 17 00:00:00 2001 From: Christel Westerberg Date: Wed, 29 May 2024 17:49:01 +0200 Subject: [PATCH] fix: add correct blocks and routes for points --- app/[lang]/webview/layout.tsx | 4 +++- components/MyPages/AccountPage/Webview/Content.tsx | 10 ++++++++++ constants/routes/webviews.ts | 10 +++++----- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/app/[lang]/webview/layout.tsx b/app/[lang]/webview/layout.tsx index 6947b119d..bab3eb073 100644 --- a/app/[lang]/webview/layout.tsx +++ b/app/[lang]/webview/layout.tsx @@ -1,6 +1,8 @@ import "@/app/globals.css" import "@scandic-hotels/design-system/style.css" +import TrpcProvider from "@/lib/trpc/Provider" + import { biroScriptPlus, firaMono, firaSans } from "@/app/fonts" import styles from "./layout.module.css" @@ -22,7 +24,7 @@ export default function RootLayout({ - {children} + {children} ) diff --git a/components/MyPages/AccountPage/Webview/Content.tsx b/components/MyPages/AccountPage/Webview/Content.tsx index b56e168e7..64bbf898b 100644 --- a/components/MyPages/AccountPage/Webview/Content.tsx +++ b/components/MyPages/AccountPage/Webview/Content.tsx @@ -5,6 +5,8 @@ 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 { AccountPageContentProps, @@ -23,6 +25,14 @@ 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 + return null + case DynamicContentComponents.earn_and_burn: + return default: return null } diff --git a/constants/routes/webviews.ts b/constants/routes/webviews.ts index c024bfc1a..4100ead0f 100644 --- a/constants/routes/webviews.ts +++ b/constants/routes/webviews.ts @@ -26,12 +26,12 @@ export const benefits = { } export const points = { - da: `${myPages.da}/point`, - de: `${myPages.de}/punkte`, + da: `${myPages.da}/points`, + de: `${myPages.de}/points`, en: `${myPages.en}/points`, - fi: `${myPages.fi}/pisteitä`, - no: `${myPages.no}/poeng`, - sv: `${myPages.sv}/poang`, + fi: `${myPages.fi}/points`, + no: `${myPages.no}/points`, + sv: `${myPages.sv}/points`, } export const programOverview = {