diff --git a/apps/web/components/booking/pages/AvailabilityPage.tsx b/apps/web/components/booking/pages/AvailabilityPage.tsx index 4b185568e9..655c9dd174 100644 --- a/apps/web/components/booking/pages/AvailabilityPage.tsx +++ b/apps/web/components/booking/pages/AvailabilityPage.tsx @@ -31,7 +31,6 @@ import { } from "@calcom/embed-core/embed-iframe"; import classNames from "@calcom/lib/classNames"; import { CAL_URL, WEBAPP_URL } from "@calcom/lib/constants"; -import { yyyymmdd } from "@calcom/lib/date-fns"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { getRecurringFreq } from "@calcom/lib/recurringStrings"; import { localStorage } from "@calcom/lib/webstorage"; @@ -125,8 +124,8 @@ const useSlots = ({ { eventTypeId, startTime: startTime?.toISOString() || "", - timeZone, endTime: endTime?.toISOString() || "", + timeZone, }, ], { enabled: !!startTime && !!endTime } @@ -182,7 +181,6 @@ const SlotPicker = ({ }, [router.isReady, month, date, timeZone]); const { i18n, isLocaleReady } = useLocale(); - const { slots: _1 } = useSlots({ eventTypeId: eventType.id, startTime: selectedDate?.startOf("day"), @@ -224,7 +222,7 @@ const SlotPicker = ({ {selectedDate && ( ({ + slots[time.format("YYYY-MM-DD")] = filteredTimes.map((time) => ({ time: time.toISOString(), users: eventType.users.map((user) => user.username || ""), // Conditionally add the attendees and booking id to slots object if there is already a booking during that time