Flatmap today's bookings (#19104)

Co-authored-by: Keith Williams <[email protected]>
This commit is contained in:
Joe Au-YeungandKeith Williams authored and GitHub committed 2025-02-05 14:35:06 +00:00
1 parent afa83ddb7f
commit 1787f6d25d
1 file changed
+2 -2
@@ -199,7 +199,7 @@ function BookingsContent({ status }: BookingsProps) {
const bookingsToday = useMemo<RowData[]>(() => {
return (
query.data?.pages.map((page) =>
query.data?.pages.flatMap((page) =>
page.bookings
.filter(
(booking: BookingOutput) =>
@@ -214,7 +214,7 @@ function BookingsContent({ status }: BookingsProps) {
),
isToday: true,
}))
)[0] || []
) || []
);
}, [query.data]);