Merged in fix/SW-3001-select-hotel-booking-code- (pull request #2576)
Fix/SW-3001 select hotel booking code * fix(SW-3001): Fixed booking code filter store to reset to default state when new search triggered, Removed state as using useState resets the value on every filter change * fix: Route tracking parsing error in select-hotel page * fix(SW-3001): Optimized code Approved-by: Matilda Landström
This commit is contained in:
@@ -2,7 +2,10 @@
|
||||
|
||||
import { create } from "zustand"
|
||||
|
||||
import { parseSelectRateSearchParams, searchParamsToRecord } from "@/utils/url"
|
||||
import {
|
||||
parseBookingWidgetSearchParams,
|
||||
searchParamsToRecord,
|
||||
} from "@/utils/url"
|
||||
|
||||
import { checkIsSameBooking } from "./enter-details/helpers"
|
||||
|
||||
@@ -79,10 +82,10 @@ const useTrackingStore = create<TrackingStoreState>((set, get) => ({
|
||||
if (!currentPath?.match(/^\/(da|de|en|fi|no|sv)\/(hotelreservation)/))
|
||||
return false
|
||||
|
||||
const previousParamsObject = parseSelectRateSearchParams(
|
||||
const previousParamsObject = parseBookingWidgetSearchParams(
|
||||
searchParamsToRecord(previousParams)
|
||||
)
|
||||
const currentParamsObject = parseSelectRateSearchParams(
|
||||
const currentParamsObject = parseBookingWidgetSearchParams(
|
||||
searchParamsToRecord(currentParams)
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user