diff --git a/frontend/src/components/EmployeeCards/EmployeeCards.tsx b/frontend/src/components/EmployeeCards/EmployeeCards.tsx index 7e58f266..3dac02d9 100644 --- a/frontend/src/components/EmployeeCards/EmployeeCards.tsx +++ b/frontend/src/components/EmployeeCards/EmployeeCards.tsx @@ -66,6 +66,14 @@ const EmployeeCard = ({ const netId = email.split('@')[0]; const fmtPhone = formatPhone(phoneNumber); + /** + * Formats availability, represented by an object that maps available days to + * start and end times, into a printable string with availabilities formatted as '[day]: [start] - [end]'. + * Ignores malformed availabilities, e.g. missing start or end times, from being printed. + * + * @param availability the driver's availability, represented as an object map of days to start and end times + * @returns a string representation of a driver's availibility + */ const formatAvail = (availability: { [key: string]: { startTime: string; endTime: string }; }) => { diff --git a/frontend/src/components/Modal/Modal.tsx b/frontend/src/components/Modal/Modal.tsx index c80b9baa..04cd08fe 100644 --- a/frontend/src/components/Modal/Modal.tsx +++ b/frontend/src/components/Modal/Modal.tsx @@ -66,19 +66,15 @@ const Modal = ({ <> {isOpen && createPortal( - -
-
+
+ +
{isRider ? (

@@ -101,8 +97,8 @@ const Modal = ({

{pages[currentPage]}
-
- , + +
, document.body )}