Files
web/apps/scandic-web/components/HotelReservation/BookingConfirmation/Header/Actions/ManageBooking.tsx
2025-05-02 12:44:07 +02:00

39 lines
1014 B
TypeScript

"use client"
import { useIntl } from "react-intl"
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
import { myStay } from "@/constants/routes/myStay"
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({ refId }: ManageBookingProps) {
const intl = useIntl()
const lang = useLang()
const bookingUrl = `${myStay[lang]}?RefId=${refId}`
return (
<Button
asChild
intent="text"
size="small"
theme="base"
variant="icon"
wrapping
>
<Link color="none" href={bookingUrl} weight="bold">
<MaterialIcon icon="edit_square" color="CurrentColor" />
{intl.formatMessage({
defaultMessage: "Manage booking",
})}
</Link>
</Button>
)
}