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:
@@ -1,9 +1,14 @@
|
||||
import type { DestinationPagesHotelData } from "@/types/hotel"
|
||||
import type { SortItem } from "../components/destinationFilterAndSort"
|
||||
import type {
|
||||
CategorizedFilters,
|
||||
SortItem,
|
||||
} from "../components/destinationFilterAndSort"
|
||||
import type { DestinationCityListItem } from "../trpc/routers/contentstack/destinationCityPage"
|
||||
|
||||
export interface DestinationDataProviderProps extends React.PropsWithChildren {
|
||||
allHotels: DestinationPagesHotelData[]
|
||||
allCities?: DestinationCityListItem[]
|
||||
allFilters: CategorizedFilters
|
||||
filterFromUrl?: string
|
||||
sortItems: SortItem[]
|
||||
}
|
||||
|
||||
@@ -44,7 +44,11 @@ export interface DestinationDataState {
|
||||
}
|
||||
|
||||
export interface InitialState
|
||||
extends Pick<DestinationDataState, "allHotels" | "allCities" | "sortItems"> {
|
||||
extends Pick<
|
||||
DestinationDataState,
|
||||
"allHotels" | "allCities" | "sortItems" | "allFilters"
|
||||
> {
|
||||
pathname: string
|
||||
filterFromUrl?: string
|
||||
searchParams: ReadonlyURLSearchParams
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user