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:
Erik Tiekstra
2025-06-18 08:42:16 +00:00
parent bb98c2652e
commit 1e039febaf
12 changed files with 149 additions and 151 deletions

View File

@@ -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>
)
}

View File

@@ -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>