Merged in chore/cleanup-booking-flow (pull request #2824)
chore: Cleanup booking-flow after migration * Remove unused types * Clean up exports, types, unused files etc in booking-flow Approved-by: Joakim Jäderberg
This commit is contained in:
@@ -32,7 +32,7 @@ import type { DetailsBooking } from "../../utils/url"
|
||||
|
||||
export const EnterDetailsContext = createContext<EnterDetailsStore | null>(null)
|
||||
|
||||
export type DetailsProviderProps = React.PropsWithChildren & {
|
||||
type DetailsProviderProps = React.PropsWithChildren & {
|
||||
booking: DetailsBooking
|
||||
breakfastPackages: BreakfastPackages
|
||||
lang: Lang
|
||||
|
||||
@@ -7,7 +7,7 @@ import type { Room } from "@scandic-hotels/trpc/types/room"
|
||||
|
||||
import type { RoomState } from "../../stores/enter-details/types"
|
||||
|
||||
export interface RoomContextValue {
|
||||
interface RoomContextValue {
|
||||
actions: RoomState["actions"]
|
||||
isComplete: RoomState["isComplete"]
|
||||
idx: number
|
||||
@@ -16,7 +16,7 @@ export interface RoomContextValue {
|
||||
steps: RoomState["steps"]
|
||||
}
|
||||
|
||||
export const RoomContext = createContext<RoomContextValue | null>(null)
|
||||
const RoomContext = createContext<RoomContextValue | null>(null)
|
||||
|
||||
export function useRoomContext() {
|
||||
const ctx = useContext(RoomContext)
|
||||
@@ -26,7 +26,7 @@ export function useRoomContext() {
|
||||
return ctx
|
||||
}
|
||||
|
||||
export type RoomProviderProps = {
|
||||
type RoomProviderProps = {
|
||||
idx: number
|
||||
room: Room
|
||||
children: React.ReactNode
|
||||
|
||||
@@ -481,7 +481,6 @@ export function SelectRateProvider({
|
||||
}
|
||||
|
||||
export const useSelectRateContext = () => useContext(SelectRateContext)
|
||||
export const SelectRateConsumer = SelectRateContext.Consumer
|
||||
|
||||
const getDefaultRoomPackages = (intl: IntlShape): DefaultRoomPackage[] =>
|
||||
[
|
||||
|
||||
@@ -224,7 +224,7 @@ type OneLevelNonNullable<T> = {
|
||||
[K in keyof T]-?: NonNullable<T[K]>
|
||||
}
|
||||
|
||||
export function calculateCorporateChequePrice(
|
||||
function calculateCorporateChequePrice(
|
||||
selectedRates: OneLevelNonNullable<SelectedRate>[],
|
||||
addAdditionalCost?: boolean
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user