fix(SW-3551): Fix issue with BookingConfigProvider in RSC * wip move config to pages * Move config providing to pages
35 lines
1.1 KiB
TypeScript
35 lines
1.1 KiB
TypeScript
import { PaymentCallbackPage as PaymentCallbackPagePrimitive } from "@scandic-hotels/booking-flow/pages/PaymentCallbackPage"
|
|
import { logger } from "@scandic-hotels/common/logger"
|
|
|
|
import { bookingFlowConfig } from "@/constants/bookingFlowConfig"
|
|
|
|
import type { PaymentCallbackStatusEnum } from "@scandic-hotels/common/constants/paymentCallbackStatusEnum"
|
|
|
|
import type { LangParams, PageArgs } from "@/types/params"
|
|
|
|
export default async function PaymentCallbackPage(
|
|
props: PageArgs<LangParams & { status: string }>
|
|
) {
|
|
const searchParams = await props.searchParams
|
|
const params = await props.params
|
|
logger.debug(`[payment-callback] callback started`)
|
|
const lang = params.lang
|
|
|
|
const userAccessToken = null
|
|
// TODO fix when auth is implemented
|
|
// const session = await auth()
|
|
// if (isValidSession(session)) {
|
|
// userAccessToken = session.token.access_token
|
|
// }
|
|
|
|
return (
|
|
<PaymentCallbackPagePrimitive
|
|
lang={lang}
|
|
userAccessToken={userAccessToken}
|
|
searchParams={searchParams}
|
|
status={params.status as PaymentCallbackStatusEnum}
|
|
config={bookingFlowConfig}
|
|
/>
|
|
)
|
|
}
|