From 61f436be2a451c664fbdece2a79e534f157ab4ea Mon Sep 17 00:00:00 2001 From: Kartik Saini <41051387+kart1ka@users.noreply.github.com> Date: Wed, 11 Sep 2024 10:17:52 +0530 Subject: [PATCH] fix: wrong reschedule link for an org member for a booking on event outside the org (#15260) * fix: wrong reschedule link * test * fix * test * test * refactor: get org id of booking * fix: redirect URL to handle movedToProfile username based on domain context * Revert not needed changes * Revert unnecessary changes now --------- Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com> Co-authored-by: Hariom --- apps/web/components/booking/BookingListItem.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/web/components/booking/BookingListItem.tsx b/apps/web/components/booking/BookingListItem.tsx index 9f2a98a550..0e8fb2a1a1 100644 --- a/apps/web/components/booking/BookingListItem.tsx +++ b/apps/web/components/booking/BookingListItem.tsx @@ -15,7 +15,6 @@ import ViewRecordingsDialog from "@calcom/features/ee/video/ViewRecordingsDialog import classNames from "@calcom/lib/classNames"; import { formatTime } from "@calcom/lib/date-fns"; import getPaymentAppData from "@calcom/lib/getPaymentAppData"; -import { useBookerUrl } from "@calcom/lib/hooks/useBookerUrl"; import { useCopy } from "@calcom/lib/hooks/useCopy"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { useGetTheme } from "@calcom/lib/hooks/useTheme"; @@ -70,7 +69,6 @@ type BookingItemProps = BookingItem & { }; function BookingListItem(booking: BookingItemProps) { - const bookerUrl = useBookerUrl(); const { userId, userTimeZone, userTimeFormat, userEmail } = booking.loggedInUser; const { @@ -183,7 +181,7 @@ function BookingListItem(booking: BookingItemProps) { id: "reschedule", icon: "clock" as const, label: t("reschedule_booking"), - href: `${bookerUrl}/reschedule/${booking.uid}${ + href: `/reschedule/${booking.uid}${ booking.seatsReferences.length ? `?seatReferenceUid=${getSeatReferenceUid()}` : "" }`, },