Merged in fix/sw-3495-booking-flow-links-to-web (pull request #2837)
fix: (SW-3495): Update booking-flow links in partner-sas * Update links to scandic web in booking-flow * Fix routeToScandicWeb util function Approved-by: Hrishikesh Vaipurkar
This commit is contained in:
@@ -4,8 +4,16 @@ import { cache } from "react"
|
||||
|
||||
import { BookingFlowConfigContextProvider } from "./bookingFlowConfigContext"
|
||||
|
||||
import type { LangRoute } from "@scandic-hotels/common/constants/routes/langRoute"
|
||||
|
||||
export type BookingFlowConfig = {
|
||||
bookingCodeEnabled: boolean
|
||||
routes: {
|
||||
myStay: LangRoute
|
||||
bookingTermsAndConditions: LangRoute
|
||||
customerService: LangRoute
|
||||
privacyPolicy: LangRoute
|
||||
}
|
||||
}
|
||||
|
||||
const getRef = cache(() => ({
|
||||
|
||||
@@ -4,9 +4,7 @@ import { createContext, useContext } from "react"
|
||||
|
||||
import type { BookingFlowConfig } from "./bookingFlowConfig"
|
||||
|
||||
type BookingFlowConfigContextData = {
|
||||
config: BookingFlowConfig
|
||||
}
|
||||
type BookingFlowConfigContextData = BookingFlowConfig
|
||||
|
||||
const BookingFlowConfigContext = createContext<
|
||||
BookingFlowConfigContextData | undefined
|
||||
@@ -32,7 +30,7 @@ export function BookingFlowConfigContextProvider({
|
||||
config: BookingFlowConfig
|
||||
}) {
|
||||
return (
|
||||
<BookingFlowConfigContext.Provider value={{ config }}>
|
||||
<BookingFlowConfigContext.Provider value={config}>
|
||||
{children}
|
||||
</BookingFlowConfigContext.Provider>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user