diff --git a/apps/scandic-web/components/Webviews/AccountPage/index.tsx b/apps/scandic-web/components/Webviews/AccountPage/index.tsx index bb131cf15..bb0e5f88c 100644 --- a/apps/scandic-web/components/Webviews/AccountPage/index.tsx +++ b/apps/scandic-web/components/Webviews/AccountPage/index.tsx @@ -1,13 +1,10 @@ import { TrackingSDK } from "@scandic-hotels/tracking/TrackingSDK" -import { overview } from "@/constants/routes/webviews" import { serverClient } from "@/lib/trpc/server" import MaxWidth from "@/components/MaxWidth" import Surprises from "@/components/MyPages/Surprises" import Blocks from "@/components/Webviews/AccountPage/Blocks" -import LinkToOverview from "@/components/Webviews/LinkToOverview" -import { getLang } from "@/i18n/serverContext" import styles from "./accountPage.module.css" @@ -21,13 +18,9 @@ export default async function AccountPage() { const { tracking, accountPage } = accountPageRes - const lang = await getLang() - const linkToOverview = `/${lang}/webview${accountPage.url}` !== overview[lang] - return ( <> - {linkToOverview ? : null} diff --git a/apps/scandic-web/components/Webviews/LinkToOverview/index.tsx b/apps/scandic-web/components/Webviews/LinkToOverview/index.tsx deleted file mode 100644 index f82db7bf5..000000000 --- a/apps/scandic-web/components/Webviews/LinkToOverview/index.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import { ArrowLeft } from "react-feather" - -import Link from "@scandic-hotels/design-system/OldDSLink" - -import { overview } from "@/constants/routes/webviews" -import { env } from "@/env/server" - -import { getIntl } from "@/i18n" -import { getLang } from "@/i18n/serverContext" -import { webviewSearchParams } from "@/utils/webviews" - -import styles from "./linkToOverview.module.css" - -export default async function LinkToOverview() { - if (!env.WEBVIEW_SHOW_OVERVIEW) { - return null - } - - const intl = await getIntl() - const searchParams = await webviewSearchParams() - - const lang = await getLang() - const overviewHref = `${overview[lang]}?${searchParams.toString()}` - return ( - - - {intl.formatMessage({ - id: "webviews.goBackToOverview", - defaultMessage: "Go back to overview", - })} - - ) -} diff --git a/apps/scandic-web/components/Webviews/LinkToOverview/linkToOverview.module.css b/apps/scandic-web/components/Webviews/LinkToOverview/linkToOverview.module.css deleted file mode 100644 index c1eef455e..000000000 --- a/apps/scandic-web/components/Webviews/LinkToOverview/linkToOverview.module.css +++ /dev/null @@ -1,7 +0,0 @@ -.overviewLink { - align-items: center; - color: var(--Scandic-Brand-Burgundy); - display: flex; - font-size: var(--Spacing-x2); - gap: var(--Spacing-x1); -} diff --git a/apps/scandic-web/components/Webviews/LoyaltyPage/index.tsx b/apps/scandic-web/components/Webviews/LoyaltyPage/index.tsx index 98745705e..0061a4108 100644 --- a/apps/scandic-web/components/Webviews/LoyaltyPage/index.tsx +++ b/apps/scandic-web/components/Webviews/LoyaltyPage/index.tsx @@ -4,7 +4,6 @@ import { TrackingSDK } from "@scandic-hotels/tracking/TrackingSDK" import { serverClient } from "@/lib/trpc/server" import MaxWidth from "@/components/MaxWidth" -import LinkToOverview from "@/components/Webviews/LinkToOverview" import Blocks from "./Blocks" @@ -22,7 +21,6 @@ export default async function AboutScandicFriends() { return ( <>
- {loyaltyPage.heading} diff --git a/apps/scandic-web/env/server.ts b/apps/scandic-web/env/server.ts index 867b0a59b..b12dfd615 100644 --- a/apps/scandic-web/env/server.ts +++ b/apps/scandic-web/env/server.ts @@ -146,11 +146,6 @@ export const env = createEnv({ .refine((s) => s === "1" || s === "0") .transform((s) => s === "1") .default("0"), - WEBVIEW_SHOW_OVERVIEW: z - .string() - .refine((s) => s === "1" || s === "0") - .transform((s) => s === "1") - .default("1"), CHATBOT_LIVE_LANGS: z .string() .optional() @@ -233,7 +228,6 @@ export const env = createEnv({ DTMC_ENTRA_ID_ISSUER: process.env.DTMC_ENTRA_ID_ISSUER, DTMC_ENTRA_ID_SECRET: process.env.DTMC_ENTRA_ID_SECRET, HOTEL_BRANDING: process.env.HOTEL_BRANDING, - WEBVIEW_SHOW_OVERVIEW: process.env.WEBVIEW_SHOW_OVERVIEW, CHATBOT_LIVE_LANGS: process.env.CHATBOT_LIVE_LANGS, }, })