Merged in fix/hotel-branding-env (pull request #3239)

Fix/hotel branding env

* feat(env): removed hotel branding env variable

* .


Approved-by: Erik Tiekstra
Approved-by: Anton Gunnarsson
Approved-by: Matilda Landström
This commit is contained in:
Linus Flood
2025-11-27 13:08:42 +00:00
parent 86e15a58c6
commit a2c517db2c
3 changed files with 4 additions and 12 deletions

View File

@@ -53,6 +53,4 @@ DTMC_ENTRA_ID_CLIENT=""
DTMC_ENTRA_ID_ISSUER=""
DTMC_ENTRA_ID_SECRET=""
HOTEL_BRANDING="0" # 0 - disabled, 1 - enabled
NEW_STAYS_ON_MY_PAGES="true"

View File

@@ -8,7 +8,6 @@ import {
} from "@scandic-hotels/common/utils/theme"
import { setTheme } from "@scandic-hotels/common/utils/theme/serverContext"
import { env } from "@/env/server"
import { getHotel, getHotelPage } from "@/lib/trpc/memoizedRequests"
import HotelMapPage from "@/components/ContentType/HotelMapPage"
@@ -46,9 +45,10 @@ export default async function HotelPagePage(
return notFound()
}
const hotelTheme = env.HOTEL_BRANDING
? getThemeByHotel(hotelPageData.hotel_page_id, hotelData.hotel.hotelType)
: DEFAULT_THEME
const hotelTheme = getThemeByHotel(
hotelPageData.hotel_page_id,
hotelData.hotel.hotelType
)
setTheme(hotelTheme)

View File

@@ -91,11 +91,6 @@ export const env = createEnv({
* We currently have the secret in local and test environments.
*/
DTMC_ENTRA_ID_SECRET: z.string().optional(),
HOTEL_BRANDING: z
.string()
.refine((s) => s === "1" || s === "0")
.transform((s) => s === "1")
.default("0"),
CHATBOT_LIVE_LANGS: z
.string()
.optional()
@@ -164,7 +159,6 @@ export const env = createEnv({
DTMC_ENTRA_ID_CLIENT: process.env.DTMC_ENTRA_ID_CLIENT,
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,
CHATBOT_LIVE_LANGS: process.env.CHATBOT_LIVE_LANGS,
NEW_STAYS_ON_MY_PAGES: process.env.NEW_STAYS_ON_MY_PAGES,
SEO_INERT: process.env.SEO_INERT,