diff --git a/packages/platform/atoms/booker/BookerPlatformWrapper.tsx b/packages/platform/atoms/booker/BookerPlatformWrapper.tsx index 9c079b8572..10e6876d93 100644 --- a/packages/platform/atoms/booker/BookerPlatformWrapper.tsx +++ b/packages/platform/atoms/booker/BookerPlatformWrapper.tsx @@ -75,6 +75,7 @@ export type BookerPlatformWrapperAtomProps = Omit< onDeleteSlotError?: (data: ApiErrorResponse) => void; locationUrl?: string; view?: VIEW_TYPE; + metadata?: Record; }; type VIEW_TYPE = keyof typeof BookerLayouts; @@ -343,7 +344,7 @@ export const BookerPlatformWrapper = ( event, bookingForm: bookerForm.bookingForm, hashedLink: props.hashedLink, - metadata: {}, + metadata: props.metadata ?? {}, handleBooking: props?.handleCreateBooking ?? createBooking, handleInstantBooking: createInstantBooking, handleRecBooking: createRecBooking, @@ -389,7 +390,7 @@ export const BookerPlatformWrapper = ( if (isOverlayCalendarEnabled && view === "MONTH_VIEW") { localStorage.removeItem("overlayCalendarSwitchDefault"); } - setIsOverlayCalendarEnabled(Boolean(localStorage?.getItem?.("overlayCalendarSwitchDefault"))); + setIsOverlayCalendarEnabled(Boolean(localStorage?.getItem?.("overlayCalendarSwitchDefault"))); }, [view, isOverlayCalendarEnabled]); return ( diff --git a/packages/platform/examples/base/src/pages/booking.tsx b/packages/platform/examples/base/src/pages/booking.tsx index bc81700335..d9f9b9111b 100644 --- a/packages/platform/examples/base/src/pages/booking.tsx +++ b/packages/platform/examples/base/src/pages/booking.tsx @@ -96,6 +96,7 @@ export default function Bookings(props: { calUsername: string; calEmail: string setBookingTitle(data.data.title ?? ""); router.push(`/${data.data.uid}`); }} + metadata={{ CustomKey: "CustomValue" }} duration={eventTypeDuration} customClassNames={{ bookerContainer: "!bg-[#F5F2FE] [&_button:!rounded-full] border-subtle border",