Merged in fix/SW-2485-hotel-directions-name (pull request #2641)
fix(SW-2485): add name and address to hotel directions * fix(SW-2485): add name and address to hotel directions * fix(SW-2485): use name and address instead of coordinates Approved-by: Matilda Landström
This commit is contained in:
@@ -21,8 +21,9 @@ interface BookingSummaryProps {
|
||||
export default function BookingSummary({ hotel }: BookingSummaryProps) {
|
||||
const intl = useIntl()
|
||||
|
||||
const directionsUrl = `https://www.google.com/maps/dir/?api=1&destination=${hotel.location.latitude},${hotel.location.longitude}`
|
||||
|
||||
const directionsUrl = `https://www.google.com/maps/dir/?api=1&destination=${encodeURIComponent(
|
||||
`${hotel.name}, ${hotel.address.streetAddress}, ${hotel.address.zipCode} ${hotel.address.city}`
|
||||
)}`
|
||||
return (
|
||||
<div className={styles.bookingSummary}>
|
||||
<Typography variant="Title/sm">
|
||||
|
||||
@@ -13,9 +13,11 @@ import styles from "./notCancelled.module.css"
|
||||
|
||||
export default function NotCancelled() {
|
||||
const intl = useIntl()
|
||||
const location = useMyStayStore((state) => state.hotel.location)
|
||||
const { hotel } = useMyStayStore((state) => state)
|
||||
|
||||
const directionsUrl = `https://www.google.com/maps/dir/?api=1&destination=${location.latitude},${location.longitude}`
|
||||
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 />
|
||||
|
||||
Reference in New Issue
Block a user