Scheduling infrastructure for absolutely everyone.
Change to run getSlots() every time so it updates when selectedDate changes
Alex van Andel881ba671d5be
diff --git a/components/booking/AvailableTimes.tsx b/components/booking/AvailableTimes.tsxindex 3acc07a2b36..f6f1057414f 100644--- a/components/booking/AvailableTimes.tsx+++ b/components/booking/AvailableTimes.tsx@@ -13,16 +13,14 @@ const AvailableTimes = (props) => {const { user, rescheduleUid } = router.query;const [loaded, setLoaded] = useState(false);- const times = useMemo(() =>- getSlots({- calendarTimeZone: props.user.timeZone,- selectedTimeZone: timeZone(),- eventLength: props.eventType.length,- selectedDate: props.date,- dayStartTime: props.user.startTime,- dayEndTime: props.user.endTime,- })- , [])+ const times = getSlots({+ calendarTimeZone: props.user.timeZone,+ selectedTimeZone: timeZone(),+ eventLength: props.eventType.length,+ selectedDate: props.date,+ dayStartTime: props.user.startTime,+ dayEndTime: props.user.endTime,+ });const handleAvailableSlots = (busyTimes: []) => {// Check for conflicts