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

This commit is contained in:
Morgan
2024-10-31 13:14:58 +00:00
committed by GitHub
parent e728ed74ce
commit 120cfed8a1
2 changed files with 5 additions and 2 deletions
@@ -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];
@@ -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(() => {