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:
Anton Gunnarsson
2025-09-18 07:28:05 +00:00
parent 9620bfe76d
commit b0f3e4afbd
44 changed files with 63 additions and 1483 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -481,7 +481,6 @@ export function SelectRateProvider({
}
export const useSelectRateContext = () => useContext(SelectRateContext)
export const SelectRateConsumer = SelectRateContext.Consumer
const getDefaultRoomPackages = (intl: IntlShape): DefaultRoomPackage[] =>
[

View File

@@ -224,7 +224,7 @@ type OneLevelNonNullable<T> = {
[K in keyof T]-?: NonNullable<T[K]>
}
export function calculateCorporateChequePrice(
function calculateCorporateChequePrice(
selectedRates: OneLevelNonNullable<SelectedRate>[],
addAdditionalCost?: boolean
) {