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
This commit is contained in:
@@ -56,7 +56,6 @@ ENABLE_SURPRISES="true"
|
||||
ENABLE_DTMC="true"
|
||||
|
||||
SHOW_SITE_WIDE_ALERT="false"
|
||||
SHOW_SIGNUP_FLOW="true"
|
||||
|
||||
USE_NEW_REWARD_MODEL="true"
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
8
apps/scandic-web/env/server.ts
vendored
8
apps/scandic-web/env/server.ts
vendored
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user