From ff6e772d6141ae35a80228ebfb6ad5e17ce75f6c Mon Sep 17 00:00:00 2001 From: Marcus Tonge <mt01158@surrey.ac.uk> Date: Fri, 28 Apr 2023 19:19:28 +0100 Subject: [PATCH] Modified Booking display to conform to new booking schema --- src/pages/bookings/bookings.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/pages/bookings/bookings.js b/src/pages/bookings/bookings.js index 4f6746a..94de836 100644 --- a/src/pages/bookings/bookings.js +++ b/src/pages/bookings/bookings.js @@ -124,18 +124,15 @@ const BookingsPage = () => { {!isLoading && !error && bookings.length > 0 && ( <Stack spacing={4} minW={"50vw"}> {bookings.map((booking) => ( - <Box key={booking.id} p={4} borderWidth={1} borderRadius={4} > - <Text> - <strong>Location:</strong> {booking.location} - </Text> - <Text> - <strong>Address:</strong> {booking.address} + <Box key={booking._id} p={4} borderWidth={1} borderRadius={4} > + <Text fontSize={20}> + <strong>Street Address:</strong> {booking.street_address} </Text> <Text> - <strong>Time of Booking:</strong> {booking.startTime} + Time of Booking: {booking.startTime.toLocaleString('en-GB', {timeZone: 'Europe/London', hour: 'numeric', year: 'numeric', month: 'short', day: 'numeric'})} </Text> <Text> - <strong>Expiry Time:</strong> {booking.endTime} + Expiry Time: {booking.endTime.toLocaleString('en-GB', {timeZone: 'Europe/London', hour: 'numeric', year: 'numeric', month: 'short', day: 'numeric'})} </Text> <Stack> -- GitLab