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:
@@ -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>
|
||||
)
|
||||
|
||||
@@ -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>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user