fix: my stay now uses ref id in query param rather than path param to support legacy * fix: my stay now uses ref id in query param rather than path param to support legacy Approved-by: Michael Zetterberg
22 lines
562 B
TypeScript
22 lines
562 B
TypeScript
import { notFound } from "next/navigation"
|
|
import { Suspense } from "react"
|
|
|
|
import { MyStay } from "@/components/HotelReservation/MyStay"
|
|
import { MyStaySkeleton } from "@/components/HotelReservation/MyStay/myStaySkeleton"
|
|
|
|
import type { LangParams, PageArgs } from "@/types/params"
|
|
|
|
export default async function MyStayPage({
|
|
searchParams,
|
|
}: PageArgs<LangParams, { RefId?: string }>) {
|
|
if (!searchParams.RefId) {
|
|
notFound()
|
|
}
|
|
|
|
return (
|
|
<Suspense fallback={<MyStaySkeleton />}>
|
|
<MyStay refId={searchParams.RefId} />
|
|
</Suspense>
|
|
)
|
|
}
|