1- import { AnimatePresence , LazyMotion , m } from "framer-motion" ;
2- import { useEffect , useMemo , useRef } from "react" ;
3- import StickyBox from "react-sticky-box" ;
4- import { Toaster } from "sonner" ;
5- import { shallow } from "zustand/shallow" ;
6-
1+ import process from "node:process" ;
72import BookingPageTagManager from "@calcom/app-store/BookingPageTagManager" ;
83import { useIsPlatformBookerEmbed } from "@calcom/atoms/hooks/useIsPlatformBookerEmbed" ;
94import dayjs from "@calcom/dayjs" ;
10- import PoweredBy from "@calcom/web/modules/ee/common/components/PoweredBy" ;
115import { useEmbedUiConfig } from "@calcom/embed-core/embed-iframe" ;
126import { updateEmbedBookerState } from "@calcom/embed-core/src/embed-iframe" ;
137import TurnstileCaptcha from "@calcom/features/auth/Turnstile" ;
148import { useBookerStoreContext } from "@calcom/features/bookings/Booker/BookerStoreProvider" ;
9+ import { useIsQuickAvailabilityCheckFeatureEnabled } from "@calcom/features/bookings/Booker/components/hooks/useIsQuickAvailabilityCheckFeatureEnabled" ;
1510import useSkipConfirmStep from "@calcom/features/bookings/Booker/components/hooks/useSkipConfirmStep" ;
11+ import {
12+ fadeInLeft ,
13+ getBookerSizeClassNames ,
14+ useBookerResizeAnimation ,
15+ } from "@calcom/features/bookings/Booker/config" ;
16+ import framerFeatures from "@calcom/features/bookings/Booker/framer-features" ;
17+ import type { BookerProps , WrappedBookerProps } from "@calcom/features/bookings/Booker/types" ;
18+ import { isBookingDryRun } from "@calcom/features/bookings/Booker/utils/isBookingDryRun" ;
19+ import { isTimeSlotAvailable } from "@calcom/features/bookings/Booker/utils/isTimeslotAvailable" ;
1620import { getQueryParam } from "@calcom/features/bookings/Booker/utils/query-param" ;
1721import { useNonEmptyScheduleDays } from "@calcom/features/schedules/lib/use-schedule/useNonEmptyScheduleDays" ;
1822import { scrollIntoViewSmooth } from "@calcom/lib/browser/browser.utils" ;
19- import { PUBLIC_INVALIDATE_AVAILABLE_SLOTS_ON_BOOKING_FORM } from "@calcom/lib/constants" ;
20- import { CLOUDFLARE_SITE_ID , CLOUDFLARE_USE_TURNSTILE_IN_BOOKER } from "@calcom/lib/constants" ;
23+ import {
24+ CLOUDFLARE_SITE_ID ,
25+ CLOUDFLARE_USE_TURNSTILE_IN_BOOKER ,
26+ PUBLIC_INVALIDATE_AVAILABLE_SLOTS_ON_BOOKING_FORM ,
27+ } from "@calcom/lib/constants" ;
2128import { useCompatSearchParams } from "@calcom/lib/hooks/useCompatSearchParams" ;
2229import { BookerLayouts } from "@calcom/prisma/zod-utils" ;
2330import classNames from "@calcom/ui/classNames" ;
2431import { UnpublishedEntity } from "@calcom/ui/components/unpublished-entity" ;
25-
26- import { VerifyCodeDialog } from "./VerifyCodeDialog" ;
32+ import PoweredBy from "@calcom/web/modules/ee/common/components/PoweredBy" ;
33+ import { AnimatePresence , LazyMotion , m } from "framer-motion" ;
34+ import { useEffect , useMemo , useRef } from "react" ;
35+ import StickyBox from "react-sticky-box" ;
36+ import { Toaster } from "sonner" ;
37+ import { shallow } from "zustand/shallow" ;
2738import { AvailableTimeSlots } from "./AvailableTimeSlots" ;
2839import { BookEventForm } from "./BookEventForm" ;
2940import { BookFormAsModal } from "./BookEventForm/BookFormAsModal" ;
@@ -38,12 +49,7 @@ import { OverlayCalendar } from "./OverlayCalendar/OverlayCalendar";
3849import { RedirectToInstantMeetingModal } from "./RedirectToInstantMeetingModal" ;
3950import { BookerSection } from "./Section" ;
4051import { NotFound } from "./Unavailable" ;
41- import { useIsQuickAvailabilityCheckFeatureEnabled } from "@calcom/features/bookings/Booker/components/hooks/useIsQuickAvailabilityCheckFeatureEnabled" ;
42- import { fadeInLeft , getBookerSizeClassNames , useBookerResizeAnimation } from "@calcom/features/bookings/Booker/config" ;
43- import framerFeatures from "@calcom/features/bookings/Booker/framer-features" ;
44- import type { BookerProps , WrappedBookerProps } from "@calcom/features/bookings/Booker/types" ;
45- import { isBookingDryRun } from "@calcom/features/bookings/Booker/utils/isBookingDryRun" ;
46- import { isTimeSlotAvailable } from "@calcom/features/bookings/Booker/utils/isTimeslotAvailable" ;
52+ import { VerifyCodeDialog } from "./VerifyCodeDialog" ;
4753
4854const BookerComponent = ( {
4955 username,
@@ -219,16 +225,24 @@ const BookerComponent = ({
219225 if ( selectedTimeslot && skipConfirmStep && isSkipConfirmStepSupported )
220226 return setBookerState ( "selecting_time" ) ;
221227 return setBookerState ( "booking" ) ;
222- } , [ event , selectedDate , selectedTimeslot , setBookerState , skipConfirmStep , layout , isInstantMeeting ] ) ;
228+ } , [
229+ event . isPending ,
230+ selectedDate ,
231+ selectedTimeslot ,
232+ setBookerState ,
233+ skipConfirmStep ,
234+ layout ,
235+ isInstantMeeting ,
236+ ] ) ;
223237
224238 const unavailableTimeSlots = isQuickAvailabilityCheckFeatureEnabled
225239 ? allSelectedTimeslots . filter ( ( slot ) => {
226- return ! isTimeSlotAvailable ( {
227- scheduleData : schedule ?. data ?? null ,
228- slotToCheckInIso : slot ,
229- quickAvailabilityChecks : slots . quickAvailabilityChecks ,
230- } ) ;
231- } )
240+ return ! isTimeSlotAvailable ( {
241+ scheduleData : schedule ?. data ?? null ,
242+ slotToCheckInIso : slot ,
243+ quickAvailabilityChecks : slots . quickAvailabilityChecks ,
244+ } ) ;
245+ } )
232246 : [ ] ;
233247
234248 const slot = getQueryParam ( "slot" ) ;
0 commit comments