Merged in feat(SW-1944)-update-url-to-mystay (pull request #1566)
feat(SW-1944) Update to correct URL to my stay (for my pages/my stays and confirmation page) * feat(SW-1944) Update to correct URL to my stay (for my pages/my stays and confirmation page) * feat(SW-1944) updated to RefId * feat(SW-1944) updated myStay path * feat(SW-1944) updated refId check Approved-by: Christian Andolf
This commit is contained in:
@@ -6,7 +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 { myStay } from "@/constants/routes/myStay"
|
||||
import { trpc } from "@/lib/trpc/client"
|
||||
|
||||
import Button from "@/components/TempDesignSystem/Button"
|
||||
@@ -44,7 +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(`${hotelreservation(lang)}/my-stay?RefId=${result.refId}`)
|
||||
router.push(`${myStay[lang]}?RefId=${result.refId}`)
|
||||
},
|
||||
onError: (error) => {
|
||||
console.error("Failed to create ref id", error)
|
||||
|
||||
Reference in New Issue
Block a user