chore: expose metadata on platform booker atom (#16673)
This commit is contained in:
@@ -75,6 +75,7 @@ export type BookerPlatformWrapperAtomProps = Omit<
|
||||
onDeleteSlotError?: (data: ApiErrorResponse) => void;
|
||||
locationUrl?: string;
|
||||
view?: VIEW_TYPE;
|
||||
metadata?: Record<string, string>;
|
||||
};
|
||||
|
||||
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 (
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user