diff --git a/apps/scandic-web/components/Webviews/LinkToOverview/index.tsx b/apps/scandic-web/components/Webviews/LinkToOverview/index.tsx index ea96ecb3e..5d5f8df89 100644 --- a/apps/scandic-web/components/Webviews/LinkToOverview/index.tsx +++ b/apps/scandic-web/components/Webviews/LinkToOverview/index.tsx @@ -9,8 +9,13 @@ import { getLang } from "@/i18n/serverContext" import { webviewSearchParams } from "@/utils/webviews" import styles from "./linkToOverview.module.css" +import { env } from "@/env/server" export default async function LinkToOverview() { + if (!env.WEBVIEW_SHOW_OVERVIEW) { + return null + } + const intl = await getIntl() const searchParams = await webviewSearchParams() diff --git a/apps/scandic-web/env/server.ts b/apps/scandic-web/env/server.ts index 1b268ab08..da3c39ac8 100644 --- a/apps/scandic-web/env/server.ts +++ b/apps/scandic-web/env/server.ts @@ -155,6 +155,11 @@ 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"), }, emptyStringAsUndefined: true, runtimeEnv: { @@ -237,6 +242,7 @@ export const env = createEnv({ DTMC_ENTRA_ID_ISSUER: process.env.DTMC_ENTRA_ID_ISSUER, DTMC_ENTRA_ID_SECRET: process.env.DTMC_ENTRA_ID_SECRET, CAMPAIGN_PAGES_ENABLED: process.env.CAMPAIGN_PAGES_ENABLED, + WEBVIEW_SHOW_OVERVIEW: process.env.WEBVIEW_SHOW_OVERVIEW, }, })