Merged in fix/tracking-fixes (pull request #1930)

Fix/tracking fixes

* fix: remove hotelInfo and paymentInfo when user reloads page on confirmation page

* fix: clean session storage item on unmount

* fix: commented out hard navigation hook

* fix: update price calculation on room ancillary in tracking

* fix: update discount calculation

* fix: add space between fns

* fix: allow useSoftNavigation to fire pageview again on same pathname

* fix: prevent bedSelection and breakfastSelection from tracking twice


Approved-by: Hrishikesh Vaipurkar
This commit is contained in:
Tobias Johansson
2025-05-03 07:27:54 +00:00
parent 0c7836fa59
commit 71f1e9fe2c
6 changed files with 84 additions and 68 deletions

View File

@@ -69,7 +69,9 @@ export default function Breakfast() {
const selectedBreakfast = methods.watch("breakfast")
const handleSubmit = methods.handleSubmit
useEffect(() => {
handleSubmit(onSubmit)()
if (selectedBreakfast) {
handleSubmit(onSubmit)()
}
}, [selectedBreakfast, handleSubmit, onSubmit])
return (