fix: add correct blocks and routes for points
This commit is contained in:
@@ -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({
|
||||
<body
|
||||
className={`${firaMono.variable} ${firaSans.variable} ${biroScriptPlus.variable} ${styles.layout}`}
|
||||
>
|
||||
{children}
|
||||
<TrpcProvider lang={params.lang}>{children}</TrpcProvider>
|
||||
</body>
|
||||
</html>
|
||||
)
|
||||
|
||||
@@ -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 <CurrentBenefitsBlock {...props} />
|
||||
case DynamicContentComponents.next_benefits:
|
||||
return <NextLevelBenefitsBlock {...props} />
|
||||
case DynamicContentComponents.my_points:
|
||||
return <CurrentPointsBalance {...props} />
|
||||
case DynamicContentComponents.expiring_points:
|
||||
// TODO: Add once available
|
||||
// return <ExpiringPoints />
|
||||
return null
|
||||
case DynamicContentComponents.earn_and_burn:
|
||||
return <EarnAndBurn {...props} />
|
||||
default:
|
||||
return null
|
||||
}
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user