Merged in fix/STAY-65-manage-stay (pull request #3089)
Fix/STAY-65 manage stay * fix: Disable manage stay for past bookings * fix: handle past and cancelled stay the same * fix: indentify past booking * fix: refactor to use design system components Approved-by: Erik Tiekstra
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
"use client"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import ButtonLink from "@scandic-hotels/design-system/ButtonLink"
|
||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||
|
||||
import { useMyStayStore } from "@/stores/my-stay"
|
||||
|
||||
import ManageStay from "./ManageStay"
|
||||
|
||||
export default function Upcoming() {
|
||||
const intl = useIntl()
|
||||
const hotel = useMyStayStore((state) => state.hotel)
|
||||
|
||||
const directionsUrl = `https://www.google.com/maps/dir/?api=1&destination=${encodeURIComponent(
|
||||
`${hotel.name}, ${hotel.address.streetAddress}, ${hotel.address.zipCode} ${hotel.address.city}`
|
||||
)}`
|
||||
return (
|
||||
<>
|
||||
<ManageStay />
|
||||
<ButtonLink
|
||||
variant="Secondary"
|
||||
size="Medium"
|
||||
target="_blank"
|
||||
href={directionsUrl}
|
||||
typography="Body/Supporting text (caption)/smBold"
|
||||
>
|
||||
<span>
|
||||
{intl.formatMessage({
|
||||
id: "myStay.referenceCard.actions.findUs",
|
||||
defaultMessage: "Find us",
|
||||
})}
|
||||
</span>
|
||||
<MaterialIcon color="CurrentColor" icon="location_on" />
|
||||
</ButtonLink>
|
||||
</>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user