From 43563bc8d59181ec2b93b5fc29ff601f3b0b14f6 Mon Sep 17 00:00:00 2001 From: Peer Richelsen Date: Wed, 22 Sep 2021 15:44:38 +0100 Subject: [PATCH] made it easier to see if there are more times available to scroll (#722) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- components/booking/AvailableTimes.tsx | 90 ++++++++++++++------------- 1 file changed, 46 insertions(+), 44 deletions(-) diff --git a/components/booking/AvailableTimes.tsx b/components/booking/AvailableTimes.tsx index 83266bad74..887843315b 100644 --- a/components/booking/AvailableTimes.tsx +++ b/components/booking/AvailableTimes.tsx @@ -29,63 +29,65 @@ const AvailableTimes = ({ }); return ( -
+
{date.format("dddd")} {date.format(", DD MMMM")}
- {!loading && - slots?.length > 0 && - slots.map((slot) => { - const bookingUrl = { - pathname: "book", - query: { - ...router.query, - date: slot.time.format(), - type: eventTypeId, - }, - }; +
+ {!loading && + slots?.length > 0 && + slots.map((slot) => { + const bookingUrl = { + pathname: "book", + query: { + ...router.query, + date: slot.time.format(), + type: eventTypeId, + }, + }; - if (rescheduleUid) { - bookingUrl.query.rescheduleUid = rescheduleUid; - } + if (rescheduleUid) { + bookingUrl.query.rescheduleUid = rescheduleUid; + } - if (schedulingType === SchedulingType.ROUND_ROBIN) { - bookingUrl.query.user = slot.users; - } + if (schedulingType === SchedulingType.ROUND_ROBIN) { + bookingUrl.query.user = slot.users; + } - return ( -
- - - {slot.time.format(timeFormat)} - - -
- ); - })} - {!loading && !error && !slots.length && ( -
-

All booked today.

-
- )} + return ( +
+ + + {slot.time.format(timeFormat)} + + +
+ ); + })} + {!loading && !error && !slots.length && ( +
+

All booked today.

+
+ )} - {loading && } + {loading && } - {error && ( -
-
-
-
-
-

Could not load the available time slots.

+ {error && ( +
+
+
+
+
+

Could not load the available time slots.

+
-
- )} + )} +
); };