Merged in fix/SA-1180-my-stay-crashing (pull request #3419)
fix(SA-1180): update url for manage booking * fix(SA-1180): update url for manage booking Approved-by: Matilda Haneling Approved-by: Linus Flood
This commit is contained in:
@@ -24,13 +24,14 @@ export default function AddToCalendarAction() {
|
||||
hotel: state.hotel,
|
||||
hotelUrl: state.hotelUrl,
|
||||
}))
|
||||
let baseUrl = typeof window !== "undefined" ? window.location.hostname : ""
|
||||
if (baseUrl.includes("localhost") || !baseUrl) {
|
||||
|
||||
let baseUrl =
|
||||
typeof window !== "undefined" ? window.location.origin : undefined
|
||||
if (!baseUrl || baseUrl.includes("localhost")) {
|
||||
// Localhost not valid for calendar URL
|
||||
baseUrl = "https://www.scandichotels.com"
|
||||
}
|
||||
|
||||
const url = new URL(hotelUrl || "", baseUrl)
|
||||
const url = new URL(hotelUrl || "/", baseUrl)
|
||||
|
||||
const calendarEvent: EventAttributes = {
|
||||
busyStatus: "FREE",
|
||||
|
||||
Reference in New Issue
Block a user