diff --git a/app/[lang]/webview/layout.tsx b/app/[lang]/webview/layout.tsx index 0d8c48ffd..eb7d7ed04 100644 --- a/app/[lang]/webview/layout.tsx +++ b/app/[lang]/webview/layout.tsx @@ -3,6 +3,9 @@ import "@scandic-hotels/design-system/style.css" import TrpcProvider from "@/lib/trpc/Provider" +import { getIntl } from "@/i18n" +import ServerIntlProvider from "@/i18n/Provider" + import styles from "./layout.module.css" import type { Metadata } from "next" @@ -13,14 +16,17 @@ export const metadata: Metadata = { title: "Webview", } -export default function RootLayout({ +export default async function RootLayout({ children, params, }: React.PropsWithChildren>) { + const { defaultLocale, locale, messages } = await getIntl() return ( - {children} + + {children} + ) diff --git a/components/ContentType/Webviews/LoyaltyPage.tsx b/components/ContentType/Webviews/LoyaltyPage.tsx index d34d32fca..a7d7fa001 100644 --- a/components/ContentType/Webviews/LoyaltyPage.tsx +++ b/components/ContentType/Webviews/LoyaltyPage.tsx @@ -19,13 +19,11 @@ export default async function AboutScandicFriends({ lang }: LangParams) {
- {loyaltyPage.sidebar ? ( -
- -
+ {loyaltyPage.sidebar.length ? ( + ) : null} - + {loyaltyPage.heading} diff --git a/components/ContentType/Webviews/loyaltyPage.module.css b/components/ContentType/Webviews/loyaltyPage.module.css index 016506517..5f83ea50c 100644 --- a/components/ContentType/Webviews/loyaltyPage.module.css +++ b/components/ContentType/Webviews/loyaltyPage.module.css @@ -8,3 +8,8 @@ margin-left: calc(var(--Spacing-x2) * -1); margin-right: calc(var(--Spacing-x2) * -1); } + +.blocks { + display: grid; + gap: var(--Spacing-x5); +} diff --git a/components/MyPages/AccountPage/Webview/Content.tsx b/components/MyPages/AccountPage/Webview/Content.tsx index 096966b38..2147566c2 100644 --- a/components/MyPages/AccountPage/Webview/Content.tsx +++ b/components/MyPages/AccountPage/Webview/Content.tsx @@ -23,7 +23,7 @@ function DynamicComponent({ component, props }: AccountPageContentProps) { return ( @@ -56,7 +56,11 @@ export default function Content({ lang, content }: ContentProps) { href: item.dynamic_content.link.linkConnection.edges[0].node .original_url || - `/${lang}/webview${item.dynamic_content.link.linkConnection.edges[0].node.url}`, + modWebviewLink( + item.dynamic_content.link.linkConnection.edges[0].node + .url, + lang + ), text: item.dynamic_content.link.link_text, } : null