fix(SW-2933): Making the hotels/city listing render correctly with active filter on page load
Approved-by: Christian Andolf Approved-by: Matilda Landström
This commit is contained in:
@@ -11,7 +11,7 @@ import type { PageArgs } from "@/types/params"
|
||||
export { generateMetadata } from "@/utils/generateMetadata"
|
||||
|
||||
export default async function DestinationCityPagePage(
|
||||
props: PageArgs<{}, { view?: "map" }>
|
||||
props: PageArgs<{}, { view?: "map"; filterFromUrl?: string }>
|
||||
) {
|
||||
const searchParams = await props.searchParams
|
||||
if (env.NEW_SITE_LIVE_STATUS === "NOT_LIVE") {
|
||||
@@ -20,7 +20,10 @@ export default async function DestinationCityPagePage(
|
||||
|
||||
return (
|
||||
<Suspense fallback={<DestinationCityPageSkeleton />}>
|
||||
<DestinationCityPage isMapView={searchParams.view === "map"} />
|
||||
<DestinationCityPage
|
||||
isMapView={searchParams.view === "map"}
|
||||
filterFromUrl={searchParams.filterFromUrl}
|
||||
/>
|
||||
</Suspense>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -10,10 +10,10 @@ import type { LangParams, PageArgs } from "@/types/params"
|
||||
|
||||
export { generateMetadata } from "@/utils/generateMetadata"
|
||||
|
||||
export default function DestinationCountryPagePage({}: PageArgs<
|
||||
LangParams,
|
||||
{ view?: "map" }
|
||||
>) {
|
||||
export default async function DestinationCountryPagePage(
|
||||
props: PageArgs<LangParams, { view?: "map"; filterFromUrl?: string }>
|
||||
) {
|
||||
const searchParams = await props.searchParams
|
||||
if (env.NEW_SITE_LIVE_STATUS === "NOT_LIVE") {
|
||||
return notFound()
|
||||
}
|
||||
@@ -22,6 +22,7 @@ export default function DestinationCountryPagePage({}: PageArgs<
|
||||
<Suspense fallback={<DestinationCountryPageSkeleton />}>
|
||||
<DestinationCountryPage
|
||||
// isMapView={searchParams.view === "map"} // Disabled until further notice
|
||||
filterFromUrl={searchParams.filterFromUrl}
|
||||
isMapView={false}
|
||||
/>
|
||||
</Suspense>
|
||||
|
||||
Reference in New Issue
Block a user