From 215b0901c09461606283cf40c5f70bab238b5b4e Mon Sep 17 00:00:00 2001 From: Christel Westerberg Date: Thu, 23 May 2024 08:21:01 +0200 Subject: [PATCH] fix: refactor token usage and types --- app/[lang]/fonts.ts | 2 +- app/[lang]/webview/layout.module.css | 3 +-- components/ContentType/Webviews/accountPage.module.css | 6 ++---- components/ContentType/Webviews/loyaltyPage.module.css | 10 ++++------ components/Loyalty/Blocks/WebView/index.tsx | 2 +- .../Webviews/LinkToOverview/linkToOverview.module.css | 2 +- server/context.ts | 2 +- 7 files changed, 11 insertions(+), 16 deletions(-) diff --git a/app/[lang]/fonts.ts b/app/[lang]/fonts.ts index 73cbdf3a1..b77335afc 100644 --- a/app/[lang]/fonts.ts +++ b/app/[lang]/fonts.ts @@ -16,7 +16,7 @@ export const firaSans = Fira_Sans({ export const biroScriptPlus = localFont({ src: [ { - path: "../../../public/_static/fonts/biro-script-plus/Biro-Script-Plus.ttf", + path: "../../public/_static/fonts/biro-script-plus/Biro-Script-Plus.ttf", style: "normal", weight: "500", }, diff --git a/app/[lang]/webview/layout.module.css b/app/[lang]/webview/layout.module.css index b03073834..423a25ccc 100644 --- a/app/[lang]/webview/layout.module.css +++ b/app/[lang]/webview/layout.module.css @@ -1,6 +1,5 @@ .layout { - padding-bottom: 7.7rem; font-family: var(--ff-fira-sans); - background-color: var(--Brand-Coffee-Subtle); + background-color: var(--Scandic-Brand-Warm-White); min-height: 100dvh; } diff --git a/components/ContentType/Webviews/accountPage.module.css b/components/ContentType/Webviews/accountPage.module.css index dbfe806a3..1144d0dc1 100644 --- a/components/ContentType/Webviews/accountPage.module.css +++ b/components/ContentType/Webviews/accountPage.module.css @@ -1,7 +1,5 @@ .blocks { display: grid; - gap: 4.2rem; - padding-left: 2rem; - padding-right: 2rem; - padding-top: 2rem; + gap: var(--Spacing-x5); + padding: var(--Spacing-x2); } diff --git a/components/ContentType/Webviews/loyaltyPage.module.css b/components/ContentType/Webviews/loyaltyPage.module.css index 593e758d2..016506517 100644 --- a/components/ContentType/Webviews/loyaltyPage.module.css +++ b/components/ContentType/Webviews/loyaltyPage.module.css @@ -1,12 +1,10 @@ .content { display: grid; - padding-top: 2rem; - padding-left: 2rem; - padding-right: 2rem; - gap: 4.2rem; + padding: var(--Spacing-x2); + gap: var(--Spacing-x5); } .sidebar { - margin-left: calc(2rem * -1); - margin-right: calc(2rem * -1); + margin-left: calc(var(--Spacing-x2) * -1); + margin-right: calc(var(--Spacing-x2) * -1); } diff --git a/components/Loyalty/Blocks/WebView/index.tsx b/components/Loyalty/Blocks/WebView/index.tsx index fbf96d315..420e8fff5 100644 --- a/components/Loyalty/Blocks/WebView/index.tsx +++ b/components/Loyalty/Blocks/WebView/index.tsx @@ -26,7 +26,7 @@ export function Blocks({ lang, blocks }: BlocksProps & LangParams) { case LoyaltyBlocksTypenameEnum.LoyaltyPageBlocksDynamicContent: const dynamicContent = { ...block.dynamic_content, - linK: block.dynamic_content.link + link: block.dynamic_content.link ? { ...block.dynamic_content.link, href: modWebviewLink(block.dynamic_content.link.href, lang), diff --git a/components/Webviews/LinkToOverview/linkToOverview.module.css b/components/Webviews/LinkToOverview/linkToOverview.module.css index 9779a2c7a..83ab1619e 100644 --- a/components/Webviews/LinkToOverview/linkToOverview.module.css +++ b/components/Webviews/LinkToOverview/linkToOverview.module.css @@ -1,5 +1,5 @@ .overviewLink { - font-size: 1.6rem; + font-size: var(--Spacing-x2); color: var(--Scandic-Brand-Burgundy, #4d001b); display: flex; align-items: center; diff --git a/server/context.ts b/server/context.ts index f70a054a4..aa4f117eb 100644 --- a/server/context.ts +++ b/server/context.ts @@ -10,7 +10,7 @@ type CreateContextOptions = { pathname: string uid?: string | null url: string - webToken: string | undefined + webToken?: string } /** Use this helper for: