don't show location if only one (#5074)

Co-authored-by: CarinaWolli <wollencarina@gmail.com>
pull/4766/head
Carina Wollendorfer 2022-10-18 16:41:14 +02:00 committed by GitHub
parent 8272fcd5c7
commit 3cf47c2ee9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 42 additions and 39 deletions

View File

@ -584,18 +584,22 @@ const BookingPage = ({
)}
</div>
</div>
<div className="mb-4">
<>
{rescheduleUid ? (
<div className="mb-4">
<span className="block text-sm font-medium text-gray-700 dark:text-white">
{t("location")}
</span>
{rescheduleUid ? (
<p className="mt-1 text-sm text-gray-500">
{getHumanReadableLocationValue(booking?.location, t)}
</p>
</div>
) : (
locations.length > 1 && (
<>
<div className="mb-4">
<span className="block text-sm font-medium text-gray-700 dark:text-white">
{t("location")}
</span>
{locations.map((location, i) => {
const locationString = locationKeyToString(location);
if (!selectedLocationType) {
@ -621,11 +625,10 @@ const BookingPage = ({
</label>
);
})}
</>
</div>
)
)}
</>
</div>
{/* TODO: Change name and id ="phone" to something generic */}
{AttendeeInput && (
<div className="mb-4">