feat: sw-929 show booking widget on hotelreservation path and separate env for sitewide alerts

This commit is contained in:
Linus Flood
2024-11-20 12:40:23 +01:00
parent 1330c8b537
commit ea325796e3
10 changed files with 72 additions and 7 deletions

View File

@@ -12,7 +12,10 @@ export default function HotelReservationLayout({
}: React.PropsWithChildren<LayoutArgs<LangParams>> & {
sidePeek: React.ReactNode
}) {
if (env.HIDE_FOR_NEXT_RELEASE) {
if (
env.HIDE_FOR_NEXT_RELEASE &&
env.HIDE_BOOKINGWIDGET_HOTELRESERVATION_PATH
) {
return notFound()
}
return (

View File

@@ -0,0 +1,8 @@
.page {
background-color: var(--Base-Background-Primary-Normal);
min-height: 50dvh;
max-width: var(--max-width);
display: flex;
align-items: center;
justify-content: center;
}

View File

@@ -1,8 +1,21 @@
import { env } from "@/env/server"
import { setLang } from "@/i18n/serverContext"
import styles from "./page.module.css"
import type { LangParams, PageArgs } from "@/types/params"
export default function HotelReservationPage({ params }: PageArgs<LangParams>) {
setLang(params.lang)
return null
if (env.HIDE_BOOKINGWIDGET_HOTELRESERVATION_PATH) {
return null
}
return (
<div className={styles.page}>
New booking flow! Please report errors/issues in Slack.
</div>
)
}