Merged in fix/STAY-67-redirect-to-webview-after-gla (pull request #2795)

fix(STAY-67): redirect to webview after guarantee on my stay

* fix(STAY-67): redirect to webview after guarantee on my stay

* fix(STAY-67): add callback page for guarantee on webview


Approved-by: Linus Flood
This commit is contained in:
Bianca Widstam
2025-09-15 07:18:58 +00:00
parent 98816b27ce
commit 800948bb94
6 changed files with 173 additions and 81 deletions

View File

@@ -18,6 +18,7 @@ import { Typography } from "@scandic-hotels/design-system/Typography"
import { trpc } from "@scandic-hotels/trpc/client"
import { BreakfastPackageEnum } from "@scandic-hotels/trpc/enums/breakfast"
import { isWebview } from "@/constants/routes/webviews"
import { env } from "@/env/client"
import {
AncillaryStepEnum,
@@ -80,7 +81,7 @@ export default function AddAncillaryFlowModal({
const pathname = usePathname()
const [isPriceDetailsOpen, setIsPriceDetailsOpen] = useState(false)
const guaranteeRedirectUrl = `${env.NEXT_PUBLIC_NODE_ENV === "development" ? `http://localhost:${env.NEXT_PUBLIC_PORT}` : ""}${guaranteeCallback(lang)}`
const guaranteeRedirectUrl = `${env.NEXT_PUBLIC_NODE_ENV === "development" ? `http://localhost:${env.NEXT_PUBLIC_PORT}` : ""}${guaranteeCallback(lang, isWebview(pathname))}`
const deliveryTimeOptions = generateDeliveryOptions()
const defaultDeliveryTime = deliveryTimeOptions[0].value