feat(BOOK-54): Adjusted filter functionality to save filters as query parameters instead of paths
* feat(BOOK-54): Destination filters now matching on id instead of slug in preparation for filters from Contentstack Approved-by: Chuma Mcphoy (We Ahead)
This commit is contained in:
@@ -10,16 +10,13 @@ import type { PageArgs } from "@/types/params"
|
||||
export { generateMetadata } from "@/utils/metadata/generateMetadata"
|
||||
|
||||
export default async function DestinationCityPagePage(
|
||||
props: PageArgs<object, { view?: "map"; filterFromUrl?: string }>
|
||||
props: PageArgs<object, { view?: "map" }>
|
||||
) {
|
||||
const searchParams = await props.searchParams
|
||||
return (
|
||||
<div className={styles.page}>
|
||||
<Suspense fallback={<DestinationCityPageSkeleton />}>
|
||||
<DestinationCityPage
|
||||
isMapView={searchParams.view === "map"}
|
||||
filterFromUrl={searchParams.filterFromUrl}
|
||||
/>
|
||||
<DestinationCityPage isMapView={searchParams.view === "map"} />
|
||||
</Suspense>
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -5,20 +5,16 @@ import DestinationCountryPageSkeleton from "@/components/ContentType/Destination
|
||||
|
||||
import styles from "./page.module.css"
|
||||
|
||||
import type { PageArgs } from "@/types/params"
|
||||
|
||||
export { generateMetadata } from "@/utils/metadata/generateMetadata"
|
||||
|
||||
export default async function DestinationCountryPagePage(
|
||||
props: PageArgs<object, { view?: "map"; filterFromUrl?: string }>
|
||||
) {
|
||||
const searchParams = await props.searchParams
|
||||
export default async function DestinationCountryPagePage() {
|
||||
// props: PageArgs<{}, { view?: "map"; }>
|
||||
// const searchParams = await props.searchParams
|
||||
return (
|
||||
<div className={styles.page}>
|
||||
<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