Skip to content

Scheduling infrastructure for absolutely everyone.

fix: booker platform atom multi duration selector (#17419)

Morgan120cfed8a191
diff --git a/packages/features/bookings/components/event-meta/Duration.tsx b/packages/features/bookings/components/event-meta/Duration.tsx
index b6bcc3d7c01..9e2cd945c77 100644
--- a/packages/features/bookings/components/event-meta/Duration.tsx
+++ b/packages/features/bookings/components/event-meta/Duration.tsx
@@ -88,7 +88,7 @@ export const EventDuration = ({
return () => clearTimeout(timeout);
}, [selectedDuration, isEmbed]);
- if ((!event?.metadata?.multipleDuration && !isDynamicEvent) || isPlatform)
+ if (!event?.metadata?.multipleDuration && !isDynamicEvent)
return <>{getDurationFormatted(event.length, t)}</>;
const durations = event?.metadata?.multipleDuration || [15, 30, 60, 90];
diff --git a/packages/platform/atoms/booker/BookerPlatformWrapper.tsx b/packages/platform/atoms/booker/BookerPlatformWrapper.tsx
index 3c909817ae0..444c573a6d0 100644
--- a/packages/platform/atoms/booker/BookerPlatformWrapper.tsx
+++ b/packages/platform/atoms/booker/BookerPlatformWrapper.tsx
@@ -126,7 +126,10 @@ export const BookerPlatformWrapper = (
return "";
}, [props.username]);
- setSelectedDuration(props.duration ?? null);
+ useEffect(() => {
+ setSelectedDuration(props.duration ?? null);
+ }, [props.duration]);
+
setOrg(props.entity?.orgSlug ?? null);
const isDynamic = useMemo(() => {