Merged in feat/webview-hide-overview-back (pull request #2684)
feat(webview): flag to show/hide back to overview-button * feat(webview): flag to show/hide back to overview-button Approved-by: Joakim Jäderberg
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
6
apps/scandic-web/env/server.ts
vendored
6
apps/scandic-web/env/server.ts
vendored
@@ -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,
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user