From 41b6377f290a77fd1d9c5f208092f274a534486a Mon Sep 17 00:00:00 2001 From: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com> Date: Fri, 29 Sep 2023 17:56:24 +0200 Subject: [PATCH] fix: availability for org team event (#11611) Co-authored-by: CarinaWolli --- packages/features/bookings/Booker/utils/event.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/features/bookings/Booker/utils/event.ts b/packages/features/bookings/Booker/utils/event.ts index a6ebd01a36f2a1..519861837f49f4 100644 --- a/packages/features/bookings/Booker/utils/event.ts +++ b/packages/features/bookings/Booker/utils/event.ts @@ -66,6 +66,8 @@ export const useScheduleForEvent = ({ const pathname = usePathname(); + const isTeam = !!event.data?.team?.parentId; + return useSchedule({ username: usernameFromStore ?? username, eventSlug: eventSlugFromStore ?? eventSlug, @@ -76,6 +78,6 @@ export const useScheduleForEvent = ({ rescheduleUid, month: monthFromStore ?? month, duration: durationFromStore ?? duration, - isTeamEvent: pathname.indexOf("/team/") !== -1, + isTeamEvent: pathname.indexOf("/team/") !== -1 || isTeam, }); };