Scheduling infrastructure for absolutely everyone.
fix: open cal video url on new page when ready (#19683)
Udit Takkarf008a28499cd
diff --git a/packages/platform/atoms/booker/BookerWebWrapper.tsx b/packages/platform/atoms/booker/BookerWebWrapper.tsxindex 8ec701941c7..b70781b1177 100644--- a/packages/platform/atoms/booker/BookerWebWrapper.tsx+++ b/packages/platform/atoms/booker/BookerWebWrapper.tsx@@ -8,6 +8,7 @@ import { shallow } from "zustand/shallow";import dayjs from "@calcom/dayjs";import { sdkActionManager } from "@calcom/embed-core/embed-iframe";+import { useIsEmbed } from "@calcom/embed-core/embed-iframe";import type { BookerProps } from "@calcom/features/bookings/Booker";import { Booker as BookerComponent } from "@calcom/features/bookings/Booker";import { useBookerLayout } from "@calcom/features/bookings/Booker/components/hooks/useBookerLayout";@@ -111,6 +112,8 @@ export const BookerWebWrapper = (props: BookerWebWrapperAtomProps) => {});const slots = useSlots(event);+ const isEmbed = useIsEmbed();+const prefetchNextMonth =(bookerLayout.layout === BookerLayouts.WEEK_VIEW &&!!bookerLayout.extraDays &&@@ -201,7 +204,13 @@ export const BookerWebWrapper = (props: BookerWebWrapperAtomProps) => {}}onConnectNowInstantMeeting={() => {const newPath = `${pathname}?isInstantMeeting=true`;- router.push(newPath);++ if (isEmbed) {+ const fullUrl = `${new URL(document.URL).origin}/${newPath}`;+ window.open(fullUrl, "_blank", "noopener,noreferrer");+ } else {+ router.push(newPath);+ }}}onOverlayClickNoCalendar={() => {router.push("/apps/categories/calendar");