Merged in feat/BOOK-434-users-should-redirect-to- (pull request #3087)

* feat(BOOK-434): Redirect user to city/country page if wrong filter url
* feat(BOOK-434): Handled map view

Approved-by: Erik Tiekstra
This commit is contained in:
Hrishikesh Vaipurkar
2025-11-07 10:30:00 +00:00
parent 61af689853
commit 28ae796b8c
5 changed files with 43 additions and 7 deletions

View File

@@ -10,13 +10,16 @@ import type { PageArgs } from "@/types/params"
export { generateMetadata } from "@/utils/metadata/generateMetadata"
export default async function DestinationCityPagePage(
props: PageArgs<object, { view?: "map" }>
props: PageArgs<object, { view?: "map"; filterFromUrl?: string }>
) {
const searchParams = await props.searchParams
return (
<div className={styles.page}>
<Suspense fallback={<DestinationCityPageSkeleton />}>
<DestinationCityPage isMapView={searchParams.view === "map"} />
<DestinationCityPage
isMapView={searchParams.view === "map"}
filterFromUrl={searchParams.filterFromUrl}
/>
</Suspense>
</div>
)

View File

@@ -10,13 +10,16 @@ import type { PageArgs } from "@/types/params"
export { generateMetadata } from "@/utils/metadata/generateMetadata"
export default async function DestinationCountryPagePage(
props: PageArgs<object, { view?: "map" }>
props: PageArgs<object, { view?: "map"; filterFromUrl?: string }>
) {
const searchParams = await props.searchParams
return (
<div className={styles.page}>
<Suspense fallback={<DestinationCountryPageSkeleton />}>
<DestinationCountryPage isMapView={searchParams.view === "map"} />
<DestinationCountryPage
filterFromUrl={searchParams.filterFromUrl}
isMapView={searchParams.view === "map"}
/>
</Suspense>
</div>
)