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:
@@ -1,23 +1,15 @@
|
||||
"use client"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { myBooking } from "@/constants/myBooking"
|
||||
import { env } from "@/env/client"
|
||||
|
||||
import { EditIcon } from "@/components/Icons"
|
||||
import Button from "@/components/TempDesignSystem/Button"
|
||||
import Link from "@/components/TempDesignSystem/Link"
|
||||
import useLang from "@/hooks/useLang"
|
||||
|
||||
import type { ManageBookingProps } from "@/types/components/hotelReservation/bookingConfirmation/actions/manageBooking"
|
||||
|
||||
export default function ManageBooking({
|
||||
confirmationNumber,
|
||||
lastName,
|
||||
}: ManageBookingProps) {
|
||||
export default function ManageBooking({ bookingUrl }: ManageBookingProps) {
|
||||
const intl = useIntl()
|
||||
const lang = useLang()
|
||||
const myBookingUrl = myBooking[env.NEXT_PUBLIC_NODE_ENV][lang]
|
||||
|
||||
return (
|
||||
<Button
|
||||
asChild
|
||||
@@ -27,11 +19,7 @@ export default function ManageBooking({
|
||||
variant="icon"
|
||||
wrapping
|
||||
>
|
||||
<Link
|
||||
color="none"
|
||||
href={`${myBookingUrl}?bookingId=${confirmationNumber}&lastName=${lastName}`}
|
||||
weight="bold"
|
||||
>
|
||||
<Link color="none" href={bookingUrl} weight="bold">
|
||||
<EditIcon />
|
||||
{intl.formatMessage({ id: "Manage booking" })}
|
||||
</Link>
|
||||
|
||||
Reference in New Issue
Block a user