From 6179b0cc561a80ab8e23e8f843cb48dbd00be86d Mon Sep 17 00:00:00 2001 From: sean-brydon <55134778+sean-brydon@users.noreply.github.com> Date: Wed, 1 Jun 2022 13:58:46 +0100 Subject: [PATCH] Fixing Spacing + text color (#2938) * Fixing Spacing + text color * Fix overflow * Fixing mobile text color --- .../booking/pages/AvailabilityPage.tsx | 261 +++++++++--------- 1 file changed, 137 insertions(+), 124 deletions(-) diff --git a/apps/web/components/booking/pages/AvailabilityPage.tsx b/apps/web/components/booking/pages/AvailabilityPage.tsx index c9f864ca31..79cb4a9e75 100644 --- a/apps/web/components/booking/pages/AvailabilityPage.tsx +++ b/apps/web/components/booking/pages/AvailabilityPage.tsx @@ -252,56 +252,64 @@ const AvailabilityPage = ({ profile, plan, eventType, workingHours, previousPage

{eventType.title}

- {eventType?.description && ( -

- - {eventType.description} -

- )} - {eventType.locations.length === 1 && ( -

- {Object.values(AppStoreLocationType).includes( - eventType.locations[0].type as unknown as AppStoreLocationType - ) ? ( - - ) : ( +

+ {eventType?.description && ( +

+ + {eventType.description} +

+ )} + {eventType.locations.length === 1 && ( +

- )} + {locationKeyToString(eventType.locations[0], t)} +

+ )} + {eventType.locations.length === 1 && ( +

+ {Object.values(AppStoreLocationType).includes( + eventType.locations[0].type as unknown as AppStoreLocationType + ) ? ( + + ) : ( + + )} - {locationKeyToString(eventType.locations[0], t)} + {locationKeyToString(eventType.locations[0], t)} +

+ )} +

+ + {eventType.length} {t("minutes")}

- )} -

- - {eventType.length} {t("minutes")} -

- {eventType.price > 0 && ( -
- - - - -
- )} -
- {booking?.startTime && rescheduleUid && ( -
-

- {t("former_time")} -

-

- - {typeof booking.startTime === "string" && - parseDate(dayjs(booking.startTime), i18n)} -

+ {eventType.price > 0 && ( +
+ + + +
)} +
+ {booking?.startTime && rescheduleUid && ( +
+

+ {t("former_time")} +

+

+ + {typeof booking.startTime === "string" && + parseDate(dayjs(booking.startTime), i18n)} +

+
+ )} +
@@ -337,88 +345,93 @@ const AvailabilityPage = ({ profile, plan, eventType, workingHours, previousPage

{eventType.title}

- {eventType?.description && ( -

- - {eventType.description} -

- )} - {eventType.locations.length === 1 && ( -

- {Object.values(AppStoreLocationType).includes( - eventType.locations[0].type as unknown as AppStoreLocationType - ) ? ( - - ) : ( - - )} - - {locationKeyToString(eventType.locations[0], t)} -

- )} - {eventType.locations.length > 1 && ( -
-
- +
+ {eventType?.description && ( +
+
+ +
+

{eventType.description}

-

- {eventType.locations.map((el, i, arr) => { - return ( - - {locationKeyToString(el, t)}{" "} - {arr.length - 1 !== i && ( - {t("or_lowercase")} - )} - - ); - })} + )} + {eventType.locations.length === 1 && ( +

+ {Object.values(AppStoreLocationType).includes( + eventType.locations[0].type as unknown as AppStoreLocationType + ) ? ( + + ) : ( + + )} + + {locationKeyToString(eventType.locations[0], t)}

-
- )} -

- - {eventType.length} {t("minutes")} -

- {!rescheduleUid && eventType.recurringEvent?.count && eventType.recurringEvent?.freq && ( -
- -

- {t("every_for_freq", { - freq: t( - `${RRuleFrequency[eventType.recurringEvent.freq].toString().toLowerCase()}` - ), - })} -

- { - setRecurringEventCount(parseInt(event?.target.value)); - }} - /> -

- {t(`${RRuleFrequency[eventType.recurringEvent.freq].toString().toLowerCase()}`, { - count: recurringEventCount, - })} -

-
- )} - {eventType.price > 0 && ( -

- - - - + )} + {eventType.locations.length > 1 && ( +

+
+ +
+

+ {eventType.locations.map((el, i, arr) => { + return ( + + {locationKeyToString(el, t)}{" "} + {arr.length - 1 !== i && ( + {t("or_lowercase")} + )} + + ); + })} +

+
+ )} +

+ + {eventType.length} {t("minutes")}

- )} - + {!rescheduleUid && eventType.recurringEvent?.count && eventType.recurringEvent?.freq && ( +
+ +

+ {t("every_for_freq", { + freq: t( + `${RRuleFrequency[eventType.recurringEvent.freq].toString().toLowerCase()}` + ), + })} +

+ { + setRecurringEventCount(parseInt(event?.target.value)); + }} + /> +

+ {t(`${RRuleFrequency[eventType.recurringEvent.freq].toString().toLowerCase()}`, { + count: recurringEventCount, + })} +

+
+ )} + {eventType.price > 0 && ( +

+ + + + +

+ )} + +
+ {previousPage === `${WEBAPP_URL}/${profile.slug}` && (