Merged in feat/SW-1997-tracking-gla-my-stay-ancillaries (pull request #1657)
Feat/SW-1997 tracking gla my stay ancillaries * feat(SW-1996): tracking gla my stay * feat(SW-1996): update gla tracking * feat(SW-1996): fix comment * feat(SW-1997): add tracking for gla my stay and ancillaries * feat(SW-1997): rebase master * feat(SW-1997): fix duplicate import * feat(SW-1997): add hotelId and category for ancillaries, and add more tracking * feat(SW-1997): remove commments and fix spelling mistake * feat(SW-1997): if addAncillary failed, but guarantee is successful, default to card in booking Approved-by: Niclas Edenvin
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { notFound, redirect } from "next/navigation"
|
||||
import { notFound } from "next/navigation"
|
||||
|
||||
import {
|
||||
BookingErrorCodeEnum,
|
||||
@@ -8,6 +8,7 @@ import { myStay } from "@/constants/routes/myStay"
|
||||
import { serverClient } from "@/lib/trpc/server"
|
||||
|
||||
import GuaranteeCallback from "@/components/HotelReservation/MyStay/Ancillaries/GuaranteeCallback"
|
||||
import TrackGuarantee from "@/components/HotelReservation/MyStay/GuaranteeLateArrival/GuaranteeLateArrivalCallback"
|
||||
import LoadingSpinner from "@/components/LoadingSpinner"
|
||||
|
||||
import type { LangParams, PageArgs } from "@/types/params"
|
||||
@@ -48,7 +49,7 @@ export default async function GuaranteePaymentCallbackPage({
|
||||
)
|
||||
}
|
||||
console.log(`[gla-payment-callback] redirecting to: ${myStayUrl}`)
|
||||
return redirect(myStayUrl)
|
||||
return <TrackGuarantee status={status} redirectUrl={myStayUrl} />
|
||||
}
|
||||
|
||||
let errorMessage = undefined
|
||||
@@ -86,7 +87,15 @@ export default async function GuaranteePaymentCallbackPage({
|
||||
if (isAncillaryFlow) {
|
||||
searchObject.set("ancillary", "ancillary")
|
||||
}
|
||||
redirect(`${myStayUrl}&${searchObject.toString()}`)
|
||||
|
||||
return (
|
||||
<TrackGuarantee
|
||||
status={status}
|
||||
isAncillaryFlow={!!isAncillaryFlow}
|
||||
redirectUrl={`${myStayUrl}&${searchObject.toString()}`}
|
||||
errorMessage={errorMessage}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
return <LoadingSpinner />
|
||||
|
||||
Reference in New Issue
Block a user