From 2e7a5a84a641d8c5c27c864635633eadf596f503 Mon Sep 17 00:00:00 2001 From: CodeWithAdnan <62213239+coder-adnan@users.noreply.github.com> Date: Mon, 2 Dec 2024 22:25:56 +0300 Subject: [PATCH] feat: Show add to calendar section for customers after booking an event (#17761) * Show 'Add to calendar' section for customers after booking an event * removed comment --------- Co-authored-by: Prashant Varma --- .../bookings/views/bookings-single-view.tsx | 222 +++++++++--------- 1 file changed, 109 insertions(+), 113 deletions(-) diff --git a/apps/web/modules/bookings/views/bookings-single-view.tsx b/apps/web/modules/bookings/views/bookings-single-view.tsx index 1029592233..b97ac3c592 100644 --- a/apps/web/modules/bookings/views/bookings-single-view.tsx +++ b/apps/web/modules/bookings/views/bookings-single-view.tsx @@ -202,7 +202,7 @@ export default function Success(props: PageProps) { }; function setIsCancellationMode(value: boolean) { - const _searchParams = new URLSearchParams(searchParams ?? undefined); + const _searchParams = new URLSearchParams(searchParams?.toString() ?? undefined); if (value) { _searchParams.set("cancel", "true"); @@ -789,119 +789,115 @@ export default function Success(props: PageProps) { )} - {userIsOwner && - !needsConfirmation && - !isCancellationMode && - isReschedulable && - !!calculatedDuration && ( - <> -
-
- - {t("add_to_calendar")} - -
- - - Google - - - - - - Microsoft Outlook - - - - - - Microsoft Office - - - - - - {t("other")} - - - -
+ {!needsConfirmation && !isCancellationMode && isReschedulable && !!calculatedDuration && ( + <> +
+
+ + {t("add_to_calendar")} + +
+ + + Google + + + + + + Microsoft Outlook + + + + + + Microsoft Office + + + + + + {t("other")} + + +
- - )} +
+ + )} {session === null && !(userIsOwner || props.hideBranding) && ( <>