Merged in feat(SW-1944)-update-url-to-mystay (pull request #1566)
feat(SW-1944) Update to correct URL to my stay (for my pages/my stays and confirmation page) * feat(SW-1944) Update to correct URL to my stay (for my pages/my stays and confirmation page) * feat(SW-1944) updated to RefId * feat(SW-1944) updated myStay path * feat(SW-1944) updated refId check Approved-by: Christian Andolf
This commit is contained in:
@@ -3,6 +3,7 @@ import { z } from "zod"
|
||||
import { baseUrls } from "@/constants/routes/baseUrls"
|
||||
import { findMyBooking } from "@/constants/routes/findMyBooking"
|
||||
import { hotelreservation } from "@/constants/routes/hotelReservation"
|
||||
import { myStay } from "@/constants/routes/myStay"
|
||||
import { env } from "@/env/server"
|
||||
|
||||
import { attributesSchema as hotelAttributesSchema } from "../../hotels/schemas/hotel"
|
||||
@@ -142,6 +143,14 @@ export function getNonContentstackUrls(lang: Lang, pathName: string) {
|
||||
}, urls)
|
||||
}
|
||||
|
||||
if (Object.values(myStay).includes(pathName)) {
|
||||
const urls: LanguageSwitcherData = {}
|
||||
return Object.entries(myStay).reduce((acc, [lang, url]) => {
|
||||
acc[lang as Lang] = { url }
|
||||
return urls
|
||||
}, urls)
|
||||
}
|
||||
|
||||
if (pathName.startsWith(hotelreservation(lang))) {
|
||||
return baseUrls
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user