From d32b8c4333962d8ecf9aab4b7480642478ec18b1 Mon Sep 17 00:00:00 2001 From: "Chuma Mcphoy (We Ahead)" Date: Thu, 3 Jul 2025 07:56:50 +0000 Subject: [PATCH] Merged in chore/remove-show-signup-flag (pull request #2507) chore: Remove no longer needed SHOW_SIGNUP_FLOW flag * chore: Remove no longer needed SHOW_SIGNUP_FLOW flag Approved-by: Anton Gunnarsson --- apps/scandic-web/.env.local.example | 1 - .../(public)/(contentTypes)/content_page/[uid]/page.tsx | 8 +------- apps/scandic-web/env/server.ts | 8 -------- 3 files changed, 1 insertion(+), 16 deletions(-) diff --git a/apps/scandic-web/.env.local.example b/apps/scandic-web/.env.local.example index 0ecdee375..c1426f4e2 100644 --- a/apps/scandic-web/.env.local.example +++ b/apps/scandic-web/.env.local.example @@ -56,7 +56,6 @@ ENABLE_SURPRISES="true" ENABLE_DTMC="true" SHOW_SITE_WIDE_ALERT="false" -SHOW_SIGNUP_FLOW="true" USE_NEW_REWARD_MODEL="true" diff --git a/apps/scandic-web/app/[lang]/(live)/(public)/(contentTypes)/content_page/[uid]/page.tsx b/apps/scandic-web/app/[lang]/(live)/(public)/(contentTypes)/content_page/[uid]/page.tsx index f2ad77dd9..8ab6ae40d 100644 --- a/apps/scandic-web/app/[lang]/(live)/(public)/(contentTypes)/content_page/[uid]/page.tsx +++ b/apps/scandic-web/app/[lang]/(live)/(public)/(contentTypes)/content_page/[uid]/page.tsx @@ -1,11 +1,9 @@ import { headers } from "next/headers" -import { notFound, redirect } from "next/navigation" +import { redirect } from "next/navigation" import { overview } from "@scandic-hotels/common/constants/routes/myPages" import { isSignupPage } from "@scandic-hotels/common/constants/routes/signup" -import { env } from "@/env/server" - import ContentPage from "@/components/ContentType/StaticPages/ContentPage" import { getLang } from "@/i18n/serverContext" import { isLoggedInUser } from "@/utils/isLoggedInUser" @@ -19,10 +17,6 @@ export default async function ContentPagePage() { const isSignupRoute = isSignupPage(pathname) if (isSignupRoute) { - if (!env.SHOW_SIGNUP_FLOW) { - notFound() - } - const isLoggedIn = await isLoggedInUser() if (isLoggedIn) { diff --git a/apps/scandic-web/env/server.ts b/apps/scandic-web/env/server.ts index 08deed6c9..1b268ab08 100644 --- a/apps/scandic-web/env/server.ts +++ b/apps/scandic-web/env/server.ts @@ -82,13 +82,6 @@ export const env = createEnv({ SEAMLESS_LOGOUT_SV: z .string() .transform((s) => replaceTopLevelDomain(s, "se")), - SHOW_SIGNUP_FLOW: z - .string() - // only allow "true" or "false" - .refine((s) => s === "true" || s === "false") - // transform to boolean - .transform((s) => s === "true") - .default("false"), WEBVIEW_ENCRYPTION_KEY: z.string(), GOOGLE_STATIC_MAP_KEY: z.string(), GOOGLE_STATIC_MAP_SIGNATURE_SECRET: z.string(), @@ -216,7 +209,6 @@ export const env = createEnv({ process.env.SEAMLESS_LOGOUT || process.env.SEAMLESS_LOGOUT_NO, SEAMLESS_LOGOUT_SV: process.env.SEAMLESS_LOGOUT || process.env.SEAMLESS_LOGOUT_SV, - SHOW_SIGNUP_FLOW: process.env.SHOW_SIGNUP_FLOW, WEBVIEW_ENCRYPTION_KEY: process.env.WEBVIEW_ENCRYPTION_KEY, GOOGLE_STATIC_MAP_KEY: process.env.GOOGLE_STATIC_MAP_KEY, GOOGLE_STATIC_MAP_SIGNATURE_SECRET: