feat: allow direct access to my stay from booking confirmation

This commit is contained in:
Michael Zetterberg
2025-05-06 09:26:02 +02:00
parent 41e5ce25b2
commit 35a2ae9dcc
7 changed files with 32 additions and 23 deletions

View File

@@ -1,11 +1,9 @@
"use client"
import { useIntl } from "react-intl"
import { myStay } from "@/constants/routes/myStay"
import { useIntl } from "react-intl"
import Body from "@/components/TempDesignSystem/Text/Body"
import Title from "@/components/TempDesignSystem/Text/Title"
import useLang from "@/hooks/useLang"
import AddToCalendar from "../../AddToCalendar"
import AddToCalendarButton from "./Actions/AddToCalendarButton"
@@ -23,10 +21,8 @@ export default function Header({
booking,
hotel,
// mainRef,
refId,
}: BookingConfirmationHeaderProps) {
const intl = useIntl()
const lang = useLang()
const text = intl.formatMessage({
defaultMessage:
@@ -52,8 +48,6 @@ export default function Header({
url: hotel.contactInformation.websiteUrl,
}
const bookingUrlPath = `${myStay[lang]}?RefId=${encodeURIComponent(refId)}`
return (
<header className={styles.header}>
<hgroup className={styles.hgroup}>
@@ -74,7 +68,7 @@ export default function Header({
hotelName={hotel.name}
renderButton={(onPress) => <AddToCalendarButton onPress={onPress} />}
/>
<ManageBooking bookingUrl={bookingUrlPath} />
<ManageBooking booking={booking} />
{/* Download Invoice will be added later (currently available on My Stay) */}
{/* <DownloadInvoice mainRef={mainRef} /> */}
</div>