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:
@@ -1,3 +1,4 @@
|
||||
import type { FacilityEnum } from "@scandic-hotels/common/constants/facilities"
|
||||
import type { z } from "zod"
|
||||
|
||||
import type {
|
||||
@@ -87,6 +88,7 @@ export type HotelInput = z.input<typeof hotelInputSchema>
|
||||
export type RoomType = Pick<Room, "roomTypes" | "name">
|
||||
|
||||
export interface HotelFilter {
|
||||
id: FacilityEnum
|
||||
name: string
|
||||
slug: string
|
||||
filterType: string
|
||||
|
||||
@@ -73,6 +73,7 @@ export function getFiltersFromHotels(
|
||||
)
|
||||
return filter
|
||||
? {
|
||||
id: filter.id,
|
||||
name: filter.name,
|
||||
slug: filter.slug,
|
||||
filterType: filter.filter,
|
||||
|
||||
Reference in New Issue
Block a user