From 3cf47c2ee9a6d1cfd552a7a6bdde61775eadfaad Mon Sep 17 00:00:00 2001 From: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com> Date: Tue, 18 Oct 2022 16:41:14 +0200 Subject: [PATCH] don't show location if only one (#5074) Co-authored-by: CarinaWolli --- .../components/booking/pages/BookingPage.tsx | 81 ++++++++++--------- 1 file changed, 42 insertions(+), 39 deletions(-) diff --git a/apps/web/components/booking/pages/BookingPage.tsx b/apps/web/components/booking/pages/BookingPage.tsx index 8ce8882d01..875fa641eb 100644 --- a/apps/web/components/booking/pages/BookingPage.tsx +++ b/apps/web/components/booking/pages/BookingPage.tsx @@ -584,48 +584,51 @@ const BookingPage = ({ )} -
- <> - - {t("location")} - - {rescheduleUid ? ( + <> + {rescheduleUid ? ( +
+ + {t("location")} +

{getHumanReadableLocationValue(booking?.location, t)}

- ) : ( - locations.length > 1 && ( - <> - {locations.map((location, i) => { - const locationString = locationKeyToString(location); - if (!selectedLocationType) { - bookingForm.setValue("locationType", locations[0].type); - } - if (typeof locationString !== "string") { - // It's possible that location app got uninstalled - return null; - } - return ( - - ); - })} - - ) - )} - -
+
+ ) : ( + locations.length > 1 && ( +
+ + {t("location")} + + {locations.map((location, i) => { + const locationString = locationKeyToString(location); + if (!selectedLocationType) { + bookingForm.setValue("locationType", locations[0].type); + } + if (typeof locationString !== "string") { + // It's possible that location app got uninstalled + return null; + } + return ( + + ); + })} +
+ ) + )} + {/* TODO: Change name and id ="phone" to something generic */} {AttendeeInput && (