Merged in fix/change-ref-id-to-query-param (pull request #1578)

fix: my stay now uses ref id in query param rather than path param to support legacy

* fix: my stay now uses ref id in query param rather than path param to support legacy


Approved-by: Michael Zetterberg
This commit is contained in:
Christian Andolf
2025-03-19 11:39:16 +00:00
committed by Linus Flood
parent 3efa303d20
commit 7ddca4acba
6 changed files with 12 additions and 12 deletions

View File

@@ -6,6 +6,7 @@ import { FormProvider, useForm } from "react-hook-form"
import { useIntl } from "react-intl"
import { customerService } from "@/constants/currentWebHrefs"
import { hotelreservation } from "@/constants/routes/hotelReservation"
import { trpc } from "@/lib/trpc/client"
import Button from "@/components/TempDesignSystem/Button"
@@ -43,9 +44,7 @@ export default function FindMyBooking() {
const values = form.getValues()
const value = new URLSearchParams(values).toString()
document.cookie = `bv=${encodeURIComponent(value)}; Path=/; Max-Age=600; Secure; SameSite=Strict`
router.push(
`/${lang}/hotelreservation/my-stay/${encodeURIComponent(result.refId)}`
)
router.push(`${hotelreservation(lang)}/my-stay?RefId=${result.refId}`)
},
onError: (error) => {
console.error("Failed to create ref id", error)