Merged in fix/sw-3495-booking-flow-links-to-web (pull request #2837)
fix: (SW-3495): Update booking-flow links in partner-sas * Update links to scandic web in booking-flow * Fix routeToScandicWeb util function Approved-by: Hrishikesh Vaipurkar
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
import { useEffect } from "react"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { myStay } from "@scandic-hotels/common/constants/routes/myStay"
|
||||
import ButtonLink from "@scandic-hotels/design-system/ButtonLink"
|
||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||
|
||||
import { useBookingFlowConfig } from "../../../../bookingFlowConfig/bookingFlowConfigContext"
|
||||
import useLang from "../../../../hooks/useLang"
|
||||
|
||||
import type { BookingConfirmation } from "@scandic-hotels/trpc/types/bookingConfirmation"
|
||||
@@ -18,6 +18,7 @@ type ManageBookingProps = Pick<BookingConfirmation, "booking">
|
||||
export default function ManageBooking({ booking }: ManageBookingProps) {
|
||||
const intl = useIntl()
|
||||
const lang = useLang()
|
||||
const { routes } = useBookingFlowConfig()
|
||||
|
||||
const { refId, confirmationNumber } = booking
|
||||
const { email, firstName, lastName } = booking.guest
|
||||
@@ -32,7 +33,7 @@ export default function ManageBooking({ booking }: ManageBookingProps) {
|
||||
document.cookie = `bv=${JSON.stringify(value)}; Path=/; Max-Age=600; Secure; SameSite=Strict`
|
||||
}, [confirmationNumber, email, firstName, lastName])
|
||||
|
||||
const myStayURL = `${myStay[lang]}?RefId=${encodeURIComponent(refId)}`
|
||||
const myStayURL = `${routes.myStay[lang]}?RefId=${encodeURIComponent(refId)}`
|
||||
|
||||
return (
|
||||
<ButtonLink
|
||||
|
||||
Reference in New Issue
Block a user