Flatmap today's bookings (#19104)
Co-authored-by: Keith Williams <keithwillcode@gmail.com>
This commit is contained in:
co-authored by
Keith Williams
parent
afa83ddb7f
commit
1787f6d25d
@@ -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]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user