Files
web/app/[lang]/(live)/(public)/hotelreservation/(standard)/layout.tsx
Linus Flood de22d873a1 Refactor
2024-11-22 13:25:57 +01:00

28 lines
562 B
TypeScript

import { notFound } from "next/navigation"
import { env } from "@/env/server"
import styles from "./layout.module.css"
import { LangParams, LayoutArgs } from "@/types/params"
export default function HotelReservationLayout({
children,
sidePeek,
}: React.PropsWithChildren<LayoutArgs<LangParams>> & {
sidePeek: React.ReactNode
}) {
if (
!env.ENABLE_BOOKING_FLOW &&
!env.ENABLE_BOOKING_WIDGET_HOTELRESERVATION_PATH
) {
return notFound()
}
return (
<div className={styles.layout}>
{children}
{sidePeek}
</div>
)
}