Feat/SW-613 refactor hotelreservation sidepeek * feat(SW-613): move sidepeek paralell route to apply for all of hotelreservation * feat(SW-613): refactor sidepeek logic to a unified approach for hotelreservation flow * feat(SW-613): fix issue where room was not selected properly in sidepeek * fix(SW-613): move back preload to layout * fix(SW-613): move preload to dedicated file * fix(SW-613): refactor sidepeek to work with hotel page * feat(SW-613): added sidepeek button for room card Approved-by: Simon.Emanuelsson
25 lines
499 B
TypeScript
25 lines
499 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.HIDE_FOR_NEXT_RELEASE) {
|
|
return notFound()
|
|
}
|
|
return (
|
|
<div className={styles.layout}>
|
|
{children}
|
|
{sidePeek}
|
|
</div>
|
|
)
|
|
}
|